Skip to content

Commit c806bc8

Browse files
josefbacikkdave
authored andcommitted
btrfs: add nr_global_roots to the super block definition
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent f1815e4 commit c806bc8

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

fs/btrfs/accessors.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,8 @@ BTRFS_SETGET_STACK_FUNCS(super_cache_generation, struct btrfs_super_block,
889889
BTRFS_SETGET_STACK_FUNCS(super_magic, struct btrfs_super_block, magic, 64);
890890
BTRFS_SETGET_STACK_FUNCS(super_uuid_tree_generation, struct btrfs_super_block,
891891
uuid_tree_generation, 64);
892+
BTRFS_SETGET_STACK_FUNCS(super_nr_global_roots, struct btrfs_super_block,
893+
nr_global_roots, 64);
892894

893895
/* struct btrfs_file_extent_item */
894896
BTRFS_SETGET_STACK_FUNCS(stack_file_extent_type, struct btrfs_file_extent_item,

include/uapi/linux/btrfs_tree.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,9 @@ struct btrfs_super_block {
688688
/* The UUID written into btree blocks */
689689
__u8 metadata_uuid[BTRFS_FSID_SIZE];
690690

691+
__u64 nr_global_roots;
692+
691693
/* Future expansion */
692-
__u8 reserved8[8];
693694
__le64 reserved[27];
694695
__u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
695696
struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];

0 commit comments

Comments
 (0)