btrfs: add nr_global_roots to the super block definition
authorJosef Bacik <josef@toxicpanda.com>
Tue, 15 Nov 2022 16:16:19 +0000 (11:16 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 5 Dec 2022 17:00:58 +0000 (18:00 +0100)
We already have this defined in btrfs-progs, add it to the kernel to
make it easier to sync these files into btrfs-progs.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/accessors.h
include/uapi/linux/btrfs_tree.h

index e6228ff73c81668a51a8aed4ec701381de6f1ee8..75c181b579eb8e5d3631be7b6210595a40723afa 100644 (file)
@@ -889,6 +889,8 @@ BTRFS_SETGET_STACK_FUNCS(super_cache_generation, struct btrfs_super_block,
 BTRFS_SETGET_STACK_FUNCS(super_magic, struct btrfs_super_block, magic, 64);
 BTRFS_SETGET_STACK_FUNCS(super_uuid_tree_generation, struct btrfs_super_block,
                         uuid_tree_generation, 64);
+BTRFS_SETGET_STACK_FUNCS(super_nr_global_roots, struct btrfs_super_block,
+                        nr_global_roots, 64);
 
 /* struct btrfs_file_extent_item */
 BTRFS_SETGET_STACK_FUNCS(stack_file_extent_type, struct btrfs_file_extent_item,
index 29895ffa470dae98a88fb1725e7c758b0758d167..ab38d0f411fa4699ec43b9f1e42372abd60c4f61 100644 (file)
@@ -688,8 +688,9 @@ struct btrfs_super_block {
        /* The UUID written into btree blocks */
        __u8 metadata_uuid[BTRFS_FSID_SIZE];
 
+       __u64 nr_global_roots;
+
        /* Future expansion */
-       __u8 reserved8[8];
        __le64 reserved[27];
        __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
        struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];