diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-03-16 00:42:25 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-05-30 18:16:43 -0400 |
commit | e8122cc6a26e1f59a38248a93cf1dd91eaef9c85 (patch) | |
tree | 3e32d7bdfaa1d73bead1c238969347985e032ffc /fs/bcachefs/btree_key_cache.c | |
parent | f3283a4ed66549bdde87f75fff2fffde9deed81b (diff) |
bcachefs: Subvolumes, snapshots
This patch adds subvolume.c - support for the subvolumes and snapshots
btrees and related data types and on disk data structures. The next
patches will start hooking up this new code to existing code.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_key_cache.c')
-rw-r--r-- | fs/bcachefs/btree_key_cache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c index 2dfa5040d045..c019200a6125 100644 --- a/fs/bcachefs/btree_key_cache.c +++ b/fs/bcachefs/btree_key_cache.c @@ -163,6 +163,11 @@ btree_key_cache_create(struct btree_key_cache *c, was_new = false; } + if (btree_id == BTREE_ID_subvolumes) + six_lock_pcpu_alloc(&ck->c.lock); + else + six_lock_pcpu_free(&ck->c.lock); + ck->c.level = 0; ck->c.btree_id = btree_id; ck->key.btree_id = btree_id; |