diff --git a/common/fsfeatures.c b/common/fsfeatures.c index ec3d967e..c50f3a37 100644 --- a/common/fsfeatures.c +++ b/common/fsfeatures.c @@ -100,6 +100,14 @@ static const struct btrfs_feature mkfs_features[] = { NULL, 0, NULL, 0, "RAID1 with 3 or 4 copies" }, +#ifdef BTRFS_ZONED + { "zoned", BTRFS_FEATURE_INCOMPAT_ZONED, + "zoned", + VERSION_TO_STRING2(5,12), + NULL, 0, + NULL, 0, + "support zoned devices" }, +#endif /* Keep this one last */ { "list-all", BTRFS_FEATURE_LIST_ALL, NULL } }; diff --git a/common/fsfeatures.h b/common/fsfeatures.h index 74ec2a21..da31346a 100644 --- a/common/fsfeatures.h +++ b/common/fsfeatures.h @@ -25,7 +25,7 @@ | BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA) /* - * Avoid multi-device features (RAID56) and mixed block groups + * Avoid multi-device features (RAID56), mixed block groups, and zoned mode */ #define BTRFS_CONVERT_ALLOWED_FEATURES \ (BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF \ @@ -35,7 +35,8 @@ | BTRFS_FEATURE_INCOMPAT_BIG_METADATA \ | BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF \ | BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA \ - | BTRFS_FEATURE_INCOMPAT_NO_HOLES) + | BTRFS_FEATURE_INCOMPAT_NO_HOLES \ + | BTRFS_FEATURE_INCOMPAT_ZONED) #define BTRFS_FEATURE_LIST_ALL (1ULL << 63) diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h index 7683b8bb..77a5ad48 100644 --- a/kernel-shared/ctree.h +++ b/kernel-shared/ctree.h @@ -495,6 +495,7 @@ struct btrfs_super_block { #define BTRFS_FEATURE_INCOMPAT_NO_HOLES (1ULL << 9) #define BTRFS_FEATURE_INCOMPAT_METADATA_UUID (1ULL << 10) #define BTRFS_FEATURE_INCOMPAT_RAID1C34 (1ULL << 11) +#define BTRFS_FEATURE_INCOMPAT_ZONED (1ULL << 12) #define BTRFS_FEATURE_COMPAT_SUPP 0ULL @@ -519,7 +520,8 @@ struct btrfs_super_block { BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA | \ BTRFS_FEATURE_INCOMPAT_NO_HOLES | \ BTRFS_FEATURE_INCOMPAT_RAID1C34 | \ - BTRFS_FEATURE_INCOMPAT_METADATA_UUID) + BTRFS_FEATURE_INCOMPAT_METADATA_UUID | \ + BTRFS_FEATURE_INCOMPAT_ZONED) /* * A leaf is full of items. offset and size tell us where to find diff --git a/kernel-shared/print-tree.c b/kernel-shared/print-tree.c index eaf75497..93566679 100644 --- a/kernel-shared/print-tree.c +++ b/kernel-shared/print-tree.c @@ -1614,6 +1614,7 @@ static struct readable_flag_entry incompat_flags_array[] = { DEF_INCOMPAT_FLAG_ENTRY(NO_HOLES), DEF_INCOMPAT_FLAG_ENTRY(METADATA_UUID), DEF_INCOMPAT_FLAG_ENTRY(RAID1C34), + DEF_INCOMPAT_FLAG_ENTRY(ZONED), }; static const int incompat_flags_num = sizeof(incompat_flags_array) / sizeof(struct readable_flag_entry);