From 1a72afaa85747cdf327b9b6a6ad1364d39007368 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Thu, 7 Jun 2012 16:00:56 -0700 Subject: [PATCH] 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 --- mkfs.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/mkfs.c b/mkfs.c index e46f1559..0e042c7a 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1273,6 +1273,8 @@ int main(int ac, char **av) u64 size_of_data = 0; u64 source_dir_size = 0; char *pretty_buf; + struct btrfs_super_block *super; + u64 flags; while(1) { int c; @@ -1483,13 +1485,14 @@ raid_groups: ret = create_data_reloc_tree(trans, root); BUG_ON(ret); - if (mixed) { - struct btrfs_super_block *super = &root->fs_info->super_copy; - u64 flags = btrfs_super_incompat_flags(super); + super = &root->fs_info->super_copy; + flags = btrfs_super_incompat_flags(super); + flags |= BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF; + if (mixed) 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 " "sectorsize %u size %s\n",