_require_test
_require_scratch
_require_scratch_dev_pool 5
-# Zoned btrfs only supports SINGLE profile
-_require_non_zoned_device ${SCRATCH_DEV}
+# We require at least one raid setup, raid1 is the easiest, use this to gate on
+# wether or not we run this test
+_require_btrfs_raid_type raid1
workout()
{
raid=$1
device_nr=$2
+ if ! _check_btrfs_raid_type $raid; then
+ echo "$raid isn't supported, skipping" >> $seqres.full
+ return
+ fi
+
echo $raid >> $seqres.full
_scratch_dev_pool_get $device_nr
_spare_dev_get
_require_command "$WIPEFS_PROG" wipefs
_require_scratch
_require_scratch_dev_pool 4
-# Zoned btrfs only supports SINGLE profile
-_require_non_zoned_device ${SCRATCH_DEV}
+# We require at least one raid setup, raid1 is the easiest, use this to gate on
+# wether or not we run this test
+_require_btrfs_raid_type raid1
_fixed_by_kernel_commit 96c2e067ed3e3e \
"btrfs: skip devices without magic signature when mounting"
raid=$1
device_nr=$2
+ if ! _check_btrfs_raid_type $raid; then
+ echo "$raid isn't supported, skipping" >> $seqres.full
+ return
+ fi
+
echo $raid >> $seqres.full
_scratch_dev_pool_get $device_nr
_fixed_by_kernel_commit 486c737f7fdc \
"btrfs: raid56: always verify the P/Q contents for scrub"
+# If neither raid5 or raid6 are supported do _notrun
+if ! _check_btrfs_raid_type raid5 && ! _check_btrfs_raid_type raid6; then
+ _notrun "requires either raid5 or raid6 support"
+fi
+
workload()
{
local profile=$1
local nr_devs=$2
+ if ! _check_btrfs_raid_type $profile; then
+ echo "$profile isn't supported, skipping" >> $seqres.full
+ return
+ fi
+
echo "=== Testing $nr_devs devices $profile ===" >> $seqres.full
_scratch_dev_pool_get $nr_devs