@@ -142,6 +142,15 @@ static const struct btrfs_feature mkfs_features[] = {
VERSION_NULL(default),
.desc = "new extent tree format"
},
+ {
+ .name = "raid56-journal",
+ .flag = BTRFS_FEATURE_INCOMPAT_RAID56_JOURNAL,
+ .sysfs_name = "raid56_journal",
+ VERSION_TO_STRING2(compat, 6,10),
+ VERSION_NULL(safe),
+ VERSION_NULL(default),
+ .desc = "write-ahead journal for RAID56"
+ },
#endif
/* Keep this one last */
{
@@ -1286,6 +1286,9 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
"\t to be used besides testing or evaluation.\n");
}
+ if ((data_profile | metadata_profile) & BTRFS_BLOCK_GROUP_JOURNAL_MASK)
+ features |= BTRFS_FEATURE_INCOMPAT_RAID56_JOURNAL;
+
if ((data_profile | metadata_profile) &
(BTRFS_BLOCK_GROUP_RAID1C3 | BTRFS_BLOCK_GROUP_RAID1C4)) {
features |= BTRFS_FEATURE_INCOMPAT_RAID1C34;
The major part is already done in the RAID56J feature introduce commit, for mkfs the only special part is about setting the BTRFS_FEATURE_INCOMPAT_RAID56_JOURNAL flag and the extra incompat flags. Unlike kernel, btrfs-progs doesn't automatically set the flag based on the chunk type, but has to do it at mkfs time. Signed-off-by: Qu Wenruo <wqu@suse.com> --- common/fsfeatures.c | 9 +++++++++ mkfs/main.c | 3 +++ 2 files changed, 12 insertions(+)