[PATCH v2 2/2] btrfs: check for incompat bit in btrfs_need_stripe_tree_update

From: Johannes Thumshirn
Date: Wed Sep 20 2023 - 05:31:41 EST


Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
---
fs/btrfs/raid-stripe-tree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/raid-stripe-tree.h b/fs/btrfs/raid-stripe-tree.h
index b5c64974e702..cdb58b38fcb5 100644
--- a/fs/btrfs/raid-stripe-tree.h
+++ b/fs/btrfs/raid-stripe-tree.h
@@ -29,7 +29,7 @@ static inline bool btrfs_need_stripe_tree_update(struct btrfs_fs_info *fs_info,
u64 type = map_type & BTRFS_BLOCK_GROUP_TYPE_MASK;
u64 profile = map_type & BTRFS_BLOCK_GROUP_PROFILE_MASK;

- if (!fs_info->stripe_root)
+ if (!btrfs_fs_incompat(fs_info, RAID_STRIPE_TREE))
return false;

if (type != BTRFS_BLOCK_GROUP_DATA)

--
2.41.0