diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-21 06:00:07 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:22:24 -0400 |
commit | b26d79147f5ffaeabbda1cad556761965d6d85fe (patch) | |
tree | 7453b1c158817965b3879b2fc66be1134bf12a2f /fs/bcachefs/subvolume.h | |
parent | b8628a2529e7d615361efdbfd6c9662b687fd828 (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/subvolume.h')
-rw-r--r-- | fs/bcachefs/subvolume.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume.h b/fs/bcachefs/subvolume.h index a2b0dc1303c2..f0979ab56a47 100644 --- a/fs/bcachefs/subvolume.h +++ b/fs/bcachefs/subvolume.h @@ -8,14 +8,18 @@ enum bkey_invalid_flags; int bch2_check_subvols(struct bch_fs *); +int bch2_check_subvol_children(struct bch_fs *); int bch2_subvolume_invalid(struct bch_fs *, struct bkey_s_c, enum bkey_invalid_flags, struct printbuf *); void bch2_subvolume_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); +int bch2_subvolume_trigger(struct btree_trans *, enum btree_id, unsigned, + struct bkey_s_c, struct bkey_s, unsigned); #define bch2_bkey_ops_subvolume ((struct bkey_ops) { \ .key_invalid = bch2_subvolume_invalid, \ .val_to_text = bch2_subvolume_to_text, \ + .trigger = bch2_subvolume_trigger, \ .min_val_size = 16, \ }) |