summaryrefslogtreecommitdiff
path: root/fs/bcachefs/sb-downgrade.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-21 06:00:07 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-13 21:22:24 -0400
commitb26d79147f5ffaeabbda1cad556761965d6d85fe (patch)
tree7453b1c158817965b3879b2fc66be1134bf12a2f /fs/bcachefs/sb-downgrade.c
parentb8628a2529e7d615361efdbfd6c9662b687fd828 (diff)
bcachefs: BTREE_ID_subvolume_children
Add a btree to record a parent -> child subvolume relationships, according to the filesystem heirarchy. The subvolume_children btree is a bitset btree: if a bit is set at pos p, that means p.offset is a child of subvolume p.inode. This will be used for efficiently listing subvolumes, as well as recursive deletion. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-downgrade.c')
-rw-r--r--fs/bcachefs/sb-downgrade.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/bcachefs/sb-downgrade.c b/fs/bcachefs/sb-downgrade.c
index 12ee83e9e251..49bc4951572c 100644
--- a/fs/bcachefs/sb-downgrade.c
+++ b/fs/bcachefs/sb-downgrade.c
@@ -48,7 +48,10 @@
BIT_ULL(BCH_RECOVERY_PASS_set_fs_needs_rebalance)) \
x(subvolume_fs_parent, \
BIT_ULL(BCH_RECOVERY_PASS_check_dirents), \
- BCH_FSCK_ERR_subvol_fs_path_parent_wrong)
+ BCH_FSCK_ERR_subvol_fs_path_parent_wrong) \
+ x(btree_subvolume_children, \
+ BIT_ULL(BCH_RECOVERY_PASS_check_subvols), \
+ BCH_FSCK_ERR_subvol_children_not_set)
#define DOWNGRADE_TABLE()