diff mbox series

[v3,01/14] btrfs: selftests: correct RAID stripe-tree feature flag setting

Message ID 20250109-rst-delete-fixes-v3-1-b5c73a4b2a80@kernel.org (mailing list archive)
State New
Headers show
Series btrfs: more RST delete fixes | expand

Commit Message

Johannes Thumshirn Jan. 9, 2025, 3:15 p.m. UTC
From: Johannes Thumshirn <johannes.thumshirn@wdc.com>

RAID stripe-tree is an incompatible feature not a read-only compatible, so
set the incompat flag not a compat_ro one in the selftest code.

Subsequent changes in btrfs_delete_raid_extent() will start checking for
this flag.

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

Comments

Johannes Thumshirn Jan. 9, 2025, 3:31 p.m. UTC | #1
On 09.01.25 16:15, Johannes Thumshirn wrote:
> From: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> 
> RAID stripe-tree is an incompatible feature not a read-only compatible, so
> set the incompat flag not a compat_ro one in the selftest code.
> 
> Subsequent changes in btrfs_delete_raid_extent() will start checking for
> this flag.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>   fs/btrfs/tests/raid-stripe-tree-tests.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/tests/raid-stripe-tree-tests.c b/fs/btrfs/tests/raid-stripe-tree-tests.c
> index 30f17eb7b6a8a1dfa9f66ed5508da42a70db1fa3..2e8083f1d0d184a23317facbb566ef949639a8a7 100644
> --- a/fs/btrfs/tests/raid-stripe-tree-tests.c
> +++ b/fs/btrfs/tests/raid-stripe-tree-tests.c
> @@ -478,7 +478,7 @@ static int run_test(test_func_t test, u32 sectorsize, u32 nodesize)
>   		ret = PTR_ERR(root);
>   		goto out;
>   	}
> -	btrfs_set_super_compat_ro_flags(root->fs_info->super_copy,
> +	btrfs_set_super_incompat_flags(root->fs_info->super_copy,
>   					BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE);

As per the other thread, that needs to be:

+	btrfs_set_fs_incompat(root->fs_info, RAID_STRIPE_TREE);
diff mbox series

Patch

diff --git a/fs/btrfs/tests/raid-stripe-tree-tests.c b/fs/btrfs/tests/raid-stripe-tree-tests.c
index 30f17eb7b6a8a1dfa9f66ed5508da42a70db1fa3..2e8083f1d0d184a23317facbb566ef949639a8a7 100644
--- a/fs/btrfs/tests/raid-stripe-tree-tests.c
+++ b/fs/btrfs/tests/raid-stripe-tree-tests.c
@@ -478,7 +478,7 @@  static int run_test(test_func_t test, u32 sectorsize, u32 nodesize)
 		ret = PTR_ERR(root);
 		goto out;
 	}
-	btrfs_set_super_compat_ro_flags(root->fs_info->super_copy,
+	btrfs_set_super_incompat_flags(root->fs_info->super_copy,
 					BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE);
 	root->root_key.objectid = BTRFS_RAID_STRIPE_TREE_OBJECTID;
 	root->root_key.type = BTRFS_ROOT_ITEM_KEY;