Skip to content

Commit 2e7acdf

Browse files
author
Kent Overstreet
committed
bcachefs: Fix deleted inodes btree in snapshot deletion
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 85103d1 commit 2e7acdf

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

fs/bcachefs/snapshot.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,15 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
14371437
if (!btree_type_has_snapshots(id))
14381438
continue;
14391439

1440+
/*
1441+
* deleted inodes btree is maintained by a trigger on the inodes
1442+
* btree - no work for us to do here, and it's not safe to scan
1443+
* it because we'll see out of date keys due to the btree write
1444+
* buffer:
1445+
*/
1446+
if (id == BTREE_ID_deleted_inodes)
1447+
continue;
1448+
14401449
ret = for_each_btree_key_commit(trans, iter,
14411450
id, POS_MIN,
14421451
BTREE_ITER_PREFETCH|BTREE_ITER_ALL_SNAPSHOTS, k,

0 commit comments

Comments
 (0)