bcachefs: BTREE_ID_snapshot_tree
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 29 Mar 2023 15:18:52 +0000 (11:18 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:01 +0000 (17:10 -0400)
commit1c59b483a3d249e08f0dcff43d9b78851d216fc1
tree4424cbe0276ababf64cd21535e705e124d51bd66
parent51e84d3bbff55f5ac79fef0d1bbf515d6d397289
bcachefs: BTREE_ID_snapshot_tree

This adds a new btree which gets us a persistent per-snapshot-tree
identifier.

 - BTREE_ID_snapshot_trees
 - KEY_TYPE_snapshot_tree
 - bch_snapshot now has a field that points to a snapshot_tree

This is going to be used to designate one snapshot ID/subvolume out of a
given tree of snapshots as the "main" subvolume, so that we can do quota
accounting in that subvolume and not the rest.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/bcachefs.h
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bkey_methods.c
fs/bcachefs/errcode.h
fs/bcachefs/fsck.c
fs/bcachefs/recovery.c
fs/bcachefs/subvolume.c
fs/bcachefs/subvolume.h
fs/bcachefs/subvolume_types.h