diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-03 18:30:08 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-04 22:19:13 -0400 |
commit | d3c7727bb9269c7f7a2f17ef76b9e5c9b8cc8863 (patch) | |
tree | 402a0d35410e968724409c01de6b112b332d73e4 /fs/bcachefs/btree_iter.h | |
parent | 01ccee225a373d859eb6e5d42dbe0138a40a7e0a (diff) | |
download | lwn-d3c7727bb9269c7f7a2f17ef76b9e5c9b8cc8863.tar.gz lwn-d3c7727bb9269c7f7a2f17ef76b9e5c9b8cc8863.zip |
bcachefs: rebalance_work btree is not a snapshots btree
rebalance_work entries may refer to entries in the extents btree, which
is a snapshots btree, or they may also refer to entries in the reflink
btree, which is not.
Hence rebalance_work keys may use the snapshot field but it's not
required to be nonzero - add a new btree flag to reflect this.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_iter.h')
-rw-r--r-- | fs/bcachefs/btree_iter.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_iter.h b/fs/bcachefs/btree_iter.h index 5e103f519e62..967cde33d433 100644 --- a/fs/bcachefs/btree_iter.h +++ b/fs/bcachefs/btree_iter.h @@ -416,6 +416,7 @@ static inline unsigned __bch2_btree_iter_flags(struct btree_trans *trans, flags |= BTREE_ITER_IS_EXTENTS; if (!(flags & __BTREE_ITER_ALL_SNAPSHOTS) && + !btree_type_has_snapshot_field(btree_id) && !btree_type_has_snapshots(btree_id)) flags &= ~BTREE_ITER_ALL_SNAPSHOTS; |