]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
fstests: change how we test for supported raid configs
authorJosef Bacik <josef@toxicpanda.com>
Fri, 5 Apr 2024 19:56:13 +0000 (15:56 -0400)
committerZorro Lang <zlang@kernel.org>
Sun, 28 Apr 2024 11:08:22 +0000 (19:08 +0800)
commitfc408e773e1dc06faa475bd386f2e8e10d7134b1
treeee62842f6c3672ed7fb4d5f31af021764aeecb45
parent465775bac1c1e45cca967ad5a2128241e730c0de
fstests: change how we test for supported raid configs

In btrfs there's a few ways we limit the RAID profiles we'll use.  We
have the raid56 feature that can be compiled out, zoned devices don't
support certain raid configurations, and you can manually set
BTRFS_PROFILE_CONFIGS to limit what you're testing.

To handle all of these different scenarios in the same way, update
_btrfs_get_profile_configs() to check for RAID56 support and remove it
if it is not there, and then add _require_btrfs_raid_type and
_check_btrfs_raid_type to get all the settings and then check if the
requested raid type is available.

>From there I've updated all of the existing tests that use

_require_btrfs_fs_feature raid56

to use

_require_btrfs_raid_type <type>

where appropriate.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
common/btrfs
tests/btrfs/125
tests/btrfs/148
tests/btrfs/157
tests/btrfs/158