summaryrefslogtreecommitdiff
path: root/fs/bcachefs/subvolume_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-07-12 13:55:03 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:07 -0400
commit8479938d7a0f6c6cf6362c72880e753b3d7a707a (patch)
tree2fcef58d98c02334138389be77b5177437e30a70 /fs/bcachefs/subvolume_types.h
parentd82978ca1593890a1b41eab6d06fe6e5950e4722 (diff)
bcachefs: Convert snapshot table to RCU array
This switches the generic radix tree for the in-memory table of snapshot nodes to a simple rcu array. This means we have to add new locking to deal with reallocations, but is faster than traversing the radix tree. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/subvolume_types.h')
-rw-r--r--fs/bcachefs/subvolume_types.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume_types.h b/fs/bcachefs/subvolume_types.h
index 750d975ac468..c596e4270690 100644
--- a/fs/bcachefs/subvolume_types.h
+++ b/fs/bcachefs/subvolume_types.h
@@ -16,6 +16,10 @@ struct snapshot_t {
u32 equiv;
};
+struct snapshot_table {
+ struct snapshot_t s[0];
+};
+
typedef struct {
u32 subvol;
u64 inum;