summaryrefslogtreecommitdiff
path: root/libbcachefs/ec.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-09-09 16:09:20 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-09-14 11:28:41 -0400
commit6ad0fa30a9c5aafda1206a64ba1262796ed35457 (patch)
treed779ccee13ee4e8fa7a7b21e799dd6126a48274d /libbcachefs/ec.c
parent0c6b9627a40559939ae58d305089c17dea7df5df (diff)
Update bcachefs sources to 1c8d3fc41e72 bcachefs: fast_list.c is only required for async obj debugging
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/ec.c')
-rw-r--r--libbcachefs/ec.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libbcachefs/ec.c b/libbcachefs/ec.c
index 271e2521..89a95b6c 100644
--- a/libbcachefs/ec.c
+++ b/libbcachefs/ec.c
@@ -22,6 +22,7 @@
#include "io_write.h"
#include "keylist.h"
#include "lru.h"
+#include "rebalance.h"
#include "recovery.h"
#include "replicas.h"
#include "super-io.h"
@@ -1129,7 +1130,13 @@ static int ec_stripe_update_extent(struct btree_trans *trans,
(union bch_extent_entry *) ec_ptr,
(union bch_extent_entry *) &stripe_ptr);
- ret = bch2_trans_update(trans, &iter, n, 0);
+ struct bch_inode_opts opts;
+
+ ret = bch2_extent_get_io_opts_one(trans, &opts, &iter, bkey_i_to_s_c(n),
+ SET_NEEDS_REBALANCE_other) ?:
+ bch2_bkey_set_needs_rebalance(trans->c, &opts, n,
+ SET_NEEDS_REBALANCE_other, 0) ?:
+ bch2_trans_update(trans, &iter, n, 0);
out:
bch2_trans_iter_exit(&iter);
return ret;
@@ -1144,8 +1151,8 @@ static int ec_stripe_update_bucket(struct btree_trans *trans, struct ec_stripe_b
int ret = 0;
CLASS(bch2_dev_tryget, ca)(c, ptr.dev);
- if (!ca)
- return bch_err_throw(c, ENOENT_dev_not_found);
+ if (!ca) /* BCH_SB_MEMBER_INVALID */
+ return 0;
struct bpos bucket_pos = PTR_BUCKET_POS(ca, &ptr);