Hi Anand, after some tests and looking at the code I discovered that the current mkfs.btrfs doesn't allow any raid profile other than SINGLE for data and meta-data when the mixed metadata/data group is enabled. It seems this behaviour was introduce by a your commit [1].
mkfs.c line 1384 onwards /* * Set default profiles according to number of added devices. * For mixed groups defaults are single/single. */ if (!mixed) { [....] } else { u32 best_leafsize = max_t(u32, sysconf(_SC_PAGESIZE), sectorsize); metadata_profile = 0; data_profile = 0; But in another your commit [2] it seems that you check that in case of mixed, the metadata and data profile have to be equal (implicitly allowing that they could be different than single ?). mkfs.c line 1373 onward if (is_vol_small(file)) { printf("SMALL VOLUME: forcing mixed metadata/data groups\n"); mixed = 1; if (metadata_profile != data_profile) { if (metadata_profile_opt || data_profile_opt) { fprintf(stderr, "With mixed block groups data and metadata profiles must be the same\n"); exit(1); } } } So I am a bit confusing: it is allowed a raid profile different than single when the mixed is enabled ? Of course mixed and raid together doesn't make sense (or almost make very little sense) but the code of mkfs is a bit confused, and a warning should be raised when the raid profile are forced to a default different from the one selected by the user. Thanks for the attention. BR G.Baroncelli [1] btrfs-progs: avoid write to the disk before sure to create fs 71d6bd3c8d70fb682c7fd50796f587ce1f1cf6f8 . [2] btrfs-progs: mkfs should check for small vol well before cdbc10729266c03aeb2eb812c17a3ef6c1ceae26 -- gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it> Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html