[PATCH v2 10/10] btrfs-progs: add the incompat flag for extent tree v2
From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-08-23 20:15:16
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Josef Bacik <josef@toxicpanda.com>
Date: 2021-08-23 20:15:16
Subsystem:
the rest · Maintainer:
Linus Torvalds
I will have a lot of preparatory patches to reduce the review pain of this large feature. In order to enable that work define the incompat flag. Once all of the work lands to support the feature there will be a patch to actually enable us to select it and manipulate file systems with that incompat flag set. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- kernel-shared/ctree.h | 1 + mkfs/main.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h
index 3cca6032..fb918aba 100644
--- a/kernel-shared/ctree.h
+++ b/kernel-shared/ctree.h@@ -496,6 +496,7 @@ struct btrfs_super_block { #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_INCOMPAT_EXTENT_TREE_V2 (1ULL << 13) #define BTRFS_FEATURE_COMPAT_SUPP 0ULL
diff --git a/mkfs/main.c b/mkfs/main.c
index edfded1f..7ea6910e 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c@@ -253,9 +253,11 @@ static int recow_roots(struct btrfs_trans_handle *trans, ret = __recow_root(trans, info->csum_root); if (ret) return ret; - ret = __recow_root(trans, info->free_space_root); - if (ret) - return ret; + if (info->free_space_root) { + ret = __recow_root(trans, info->free_space_root); + if (ret) + return ret; + } return 0; }
--
2.26.3