diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-29 13:10:36 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:58 -0400 |
commit | 6bdefe9c3900b3bb7a028486423520cdc975d9a8 (patch) | |
tree | b6c65237048bc4ed45e4b7d9cefbe837e2d32c6a /fs/bcachefs/backpointers.c | |
parent | 4f77dcde2841e43e4c5fe9f178a64ec40be72e17 (diff) | |
download | linux-stable-6bdefe9c3900b3bb7a028486423520cdc975d9a8.tar.gz linux-stable-6bdefe9c3900b3bb7a028486423520cdc975d9a8.tar.bz2 linux-stable-6bdefe9c3900b3bb7a028486423520cdc975d9a8.zip |
bcachefs: Use BTREE_ITER_INTENT in ec_stripe_update_extent()
This adds a flags param to bch2_backpointer_get_key() so that we can
pass BTREE_ITER_INTENT, since ec_stripe_update_extent() is updating the
extent immediately.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/backpointers.c')
-rw-r--r-- | fs/bcachefs/backpointers.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/bcachefs/backpointers.c b/fs/bcachefs/backpointers.c index 740084b3ff12..9121fae0fd6c 100644 --- a/fs/bcachefs/backpointers.c +++ b/fs/bcachefs/backpointers.c @@ -420,7 +420,8 @@ struct bkey_s_c bch2_backpointer_get_key(struct btree_trans *trans, struct btree_iter *iter, struct bpos bucket, u64 bp_offset, - struct bch_backpointer bp) + struct bch_backpointer bp, + unsigned iter_flags) { struct bch_fs *c = trans->c; struct bkey_s_c k; @@ -430,7 +431,7 @@ struct bkey_s_c bch2_backpointer_get_key(struct btree_trans *trans, bp.pos, 0, min(bp.level, c->btree_roots[bp.btree_id].level), - 0); + iter_flags); k = bch2_btree_iter_peek_slot(iter); if (bkey_err(k)) { bch2_trans_iter_exit(trans, iter); @@ -976,7 +977,7 @@ static int check_one_backpointer(struct btree_trans *trans, bbpos_cmp(pos, end) > 0) return 0; - k = bch2_backpointer_get_key(trans, &iter, bucket, *bp_offset, bp); + k = bch2_backpointer_get_key(trans, &iter, bucket, *bp_offset, bp, 0); ret = bkey_err(k); if (ret == -BCH_ERR_backpointer_to_overwritten_btree_node) return 0; |