mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
bcachefs: btree_iter_peek_upto() now handles BTREE_ITER_all_snapshots
end_pos now compares against snapshot ID when required Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
38864eccf7
commit
12f286085b
@ -2381,9 +2381,9 @@ struct bkey_s_c bch2_btree_iter_peek_upto(struct btree_iter *iter, struct bpos e
|
||||
else
|
||||
iter_pos = bkey_max(iter->pos, bkey_start_pos(k.k));
|
||||
|
||||
if (unlikely(!(iter->flags & BTREE_ITER_is_extents)
|
||||
? bkey_gt(iter_pos, end)
|
||||
: bkey_ge(iter_pos, end)))
|
||||
if (unlikely(iter->flags & BTREE_ITER_all_snapshots ? bpos_gt(iter_pos, end) :
|
||||
iter->flags & BTREE_ITER_is_extents ? bkey_ge(iter_pos, end) :
|
||||
bkey_gt(iter_pos, end)))
|
||||
goto end;
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user