diff mbox series

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

Message ID 20230920-rst-updates-v2-2-b4dc154a648f@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs: RAID stripe tree updates | expand

Commit Message

Johannes Thumshirn Sept. 20, 2023, 9:31 a.m. UTC
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/raid-stripe-tree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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)