projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c497df8
)
bcachefs: Fix bch2_fs_check_snapshots()
author
Kent Overstreet
<kent.overstreet@gmail.com>
Mon, 15 Aug 2022 18:01:56 +0000
(14:01 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:38 +0000
(17:09 -0400)
We were iterating starting at BCACHEFS_ROOT_INO, but snapshots start at
POS_MIN - meaning this code was never getting run.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Reported-by: Olexa Bilaniuk <obilaniu@gmail.com>
fs/bcachefs/subvolume.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/subvolume.c
b/fs/bcachefs/subvolume.c
index 24244bc3d2fbff6703dcf5b4e27d513ebb7082dc..fb3f8e4074c7a65d38939402a80a91af6db18ba4 100644
(file)
--- a/
fs/bcachefs/subvolume.c
+++ b/
fs/bcachefs/subvolume.c
@@
-278,8
+278,8
@@
int bch2_fs_check_snapshots(struct bch_fs *c)
bch2_trans_init(&trans, c, 0, 0);
- ret = for_each_btree_key_commit(&trans, iter,
BTREE_ID_snapshots,
-
POS(BCACHEFS_ROOT_INO, 0)
,
+ ret = for_each_btree_key_commit(&trans, iter,
+
BTREE_ID_snapshots, POS_MIN
,
BTREE_ITER_PREFETCH, k,
NULL, NULL, BTREE_INSERT_LAZY_RW|BTREE_INSERT_NOFAIL,
check_snapshot(&trans, &iter, k));