btrfs-progs: mkfs support for extended inode refs
This patch turns on the BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF superblock flag when creating a new file system in mkfs, enabling extended inode refs. Signed-off-by: Mark Fasheh <mfasheh@suse.de>
This commit is contained in:
parent
86279e7ef2
commit
1a72afaa85
13
mkfs.c
13
mkfs.c
|
@ -1273,6 +1273,8 @@ int main(int ac, char **av)
|
||||||
u64 size_of_data = 0;
|
u64 size_of_data = 0;
|
||||||
u64 source_dir_size = 0;
|
u64 source_dir_size = 0;
|
||||||
char *pretty_buf;
|
char *pretty_buf;
|
||||||
|
struct btrfs_super_block *super;
|
||||||
|
u64 flags;
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
int c;
|
int c;
|
||||||
|
@ -1483,13 +1485,14 @@ raid_groups:
|
||||||
ret = create_data_reloc_tree(trans, root);
|
ret = create_data_reloc_tree(trans, root);
|
||||||
BUG_ON(ret);
|
BUG_ON(ret);
|
||||||
|
|
||||||
if (mixed) {
|
super = &root->fs_info->super_copy;
|
||||||
struct btrfs_super_block *super = &root->fs_info->super_copy;
|
flags = btrfs_super_incompat_flags(super);
|
||||||
u64 flags = btrfs_super_incompat_flags(super);
|
flags |= BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF;
|
||||||
|
|
||||||
|
if (mixed)
|
||||||
flags |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
|
flags |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
|
||||||
btrfs_set_super_incompat_flags(super, flags);
|
|
||||||
}
|
btrfs_set_super_incompat_flags(super, flags);
|
||||||
|
|
||||||
printf("fs created label %s on %s\n\tnodesize %u leafsize %u "
|
printf("fs created label %s on %s\n\tnodesize %u leafsize %u "
|
||||||
"sectorsize %u size %s\n",
|
"sectorsize %u size %s\n",
|
||||||
|
|
Loading…
Reference in New Issue