btrfs-progs: mkfs: sort features by compat version

The list 'mkfs -O list-all' should be sorted by version of kernel
support (compat) so it's clear what's new.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-10-10 19:28:03 +02:00
parent e79f18a4a7
commit 723137547b

View File

@ -90,6 +90,9 @@ struct btrfs_feature {
const char *desc;
};
/*
* Keep the list sorted by compat version.
*/
static const struct btrfs_feature mkfs_features[] = {
{
.name = "mixed-bg",
@ -109,15 +112,6 @@ static const struct btrfs_feature mkfs_features[] = {
VERSION_NULL(default),
.desc = "quota support (qgroups)"
},
{
.name = "squota",
.incompat_flag = BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA,
.sysfs_name = "squota",
VERSION_TO_STRING2(compat, 6,7),
VERSION_NULL(safe),
VERSION_NULL(default),
.desc = "squota support (simple accounting qgroups)"
},
{
.name = "extref",
.incompat_flag = BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF,
@ -180,6 +174,17 @@ static const struct btrfs_feature mkfs_features[] = {
VERSION_NULL(default),
.desc = "support zoned devices"
},
#endif
#if EXPERIMENTAL
{
.name = "extent-tree-v2",
.incompat_flag = BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2,
.sysfs_name = "extent_tree_v2",
VERSION_TO_STRING2(compat, 5,15),
VERSION_NULL(safe),
VERSION_NULL(default),
.desc = "new extent tree format"
},
#endif
{
.name = "block-group-tree",
@ -192,14 +197,6 @@ static const struct btrfs_feature mkfs_features[] = {
},
#if EXPERIMENTAL
{
.name = "extent-tree-v2",
.incompat_flag = BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2,
.sysfs_name = "extent_tree_v2",
VERSION_TO_STRING2(compat, 5,15),
VERSION_NULL(safe),
VERSION_NULL(default),
.desc = "new extent tree format"
} , {
.name = "raid-stripe-tree",
.incompat_flag = BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE,
.sysfs_name = NULL,
@ -208,6 +205,15 @@ static const struct btrfs_feature mkfs_features[] = {
VERSION_NULL(default),
.desc = "raid stripe tree"
},
{
.name = "squota",
.incompat_flag = BTRFS_FEATURE_INCOMPAT_SIMPLE_QUOTA,
.sysfs_name = "squota",
VERSION_TO_STRING2(compat, 6,7),
VERSION_NULL(safe),
VERSION_NULL(default),
.desc = "squota support (simple accounting qgroups)"
},
#endif
/* Keep this one last */
{