diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-10-11 04:32:41 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:50 -0400 |
commit | c72f687a1ff1801b404fab804fdddcaf034e6ef4 (patch) | |
tree | 53648acc4521cf44688250b6402edf871bec0781 /fs/bcachefs/ec.c | |
parent | 5b3008bc6182e56fdd5ba36fdf324430d0792e0c (diff) |
bcachefs: Use for_each_btree_key_upto() more consistently
It's important that in BTREE_ITER_FILTER_SNAPSHOTS mode we always use
peek_upto() and provide an end for the interval we're searching for -
otherwise, when we hit the end of the inode the next inode be in a
different subvolume and not have any keys in the current snapshot, and
we'd iterate over arbitrarily many keys before returning one.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/ec.c')
-rw-r--r-- | fs/bcachefs/ec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/ec.c b/fs/bcachefs/ec.c index 0d33dee1aed4..e320868a8b8b 100644 --- a/fs/bcachefs/ec.c +++ b/fs/bcachefs/ec.c @@ -683,7 +683,7 @@ static int ec_stripe_delete(struct bch_fs *c, size_t idx) { return bch2_btree_delete_range(c, BTREE_ID_stripes, POS(0, idx), - POS(0, idx + 1), + POS(0, idx), 0, NULL); } |