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

Johannes Thumshirn posted 2 patches 2 years, 4 months ago
There is a newer version of this series
[PATCH v2 2/2] btrfs: check for incompat bit in btrfs_need_stripe_tree_update
Posted by Johannes Thumshirn 2 years, 4 months ago
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 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