summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs.c')
-rw-r--r--mkfs.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/mkfs.c b/mkfs.c
index 5940abd9..bbbcc46e 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -1540,6 +1540,19 @@ int main(int ac, char **av)
if (!nodesize_forced)
nodesize = best_nodesize;
}
+
+ /*
+ * FS features that can be set by other means than -O
+ * just set the bit here
+ */
+ if (mixed)
+ features |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
+
+ if ((data_profile | metadata_profile) &
+ (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)) {
+ features |= BTRFS_FEATURE_INCOMPAT_RAID56;
+ }
+
if (btrfs_check_nodesize(nodesize, sectorsize,
features))
exit(1);
@@ -1647,18 +1660,6 @@ int main(int ac, char **av)
"WARNING: metatdata has lower redundancy than data!\n\n");
}
- /*
- * FS features that can be set by other means than -O
- * just set the bit here
- */
- if (mixed)
- features |= BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS;
-
- if ((data_profile | metadata_profile) &
- (BTRFS_BLOCK_GROUP_RAID5 | BTRFS_BLOCK_GROUP_RAID6)) {
- features |= BTRFS_FEATURE_INCOMPAT_RAID56;
- }
-
mkfs_cfg.label = label;
mkfs_cfg.fs_uuid = fs_uuid;
memcpy(mkfs_cfg.blocks, blocks, sizeof(blocks));