diff mbox series

btrfs/295: skip on zoned device as we cannot corrupt it directly

Message ID 20230926141147.471503-1-naohiro.aota@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs/295: skip on zoned device as we cannot corrupt it directly | expand

Commit Message

Naohiro Aota Sept. 26, 2023, 2:11 p.m. UTC
We use _pwrite_byte to corrupt the root node, but such overwrite won't work
on a sequential write required zone. So, skip the test on a zoned device.

Technically, we can run this test case by checking if the physical location
lands in a conventional zone. But, the logic should be no difference than
the regular mode and I don't think it's worth doing so.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 tests/btrfs/295 | 2 ++
 1 file changed, 2 insertions(+)

Comments

Anand Jain Sept. 26, 2023, 2:27 p.m. UTC | #1
On 26/09/2023 22:11, Naohiro Aota wrote:
> We use _pwrite_byte to corrupt the root node, but such overwrite won't work
> on a sequential write required zone. So, skip the test on a zoned device.
> 
> Technically, we can run this test case by checking if the physical location
> lands in a conventional zone. But, the logic should be no difference than
> the regular mode and I don't think it's worth doing so.
> 
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
> ---
>   tests/btrfs/295 | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/tests/btrfs/295 b/tests/btrfs/295
> index a9a8e5530a80..00a5c5680b86 100755
> --- a/tests/btrfs/295
> +++ b/tests/btrfs/295
> @@ -12,6 +12,8 @@ _begin_fstest auto quick dangerous
>   . ./common/filter
>   _supported_fs btrfs
>   _require_scratch
> +# Directly writing to the device, which may not work with a zoned device
> +_require_non_zoned_device "$SCRATCH_DEV"

Looks good.

Reviewed-by: Anand Jain <anand.jain@oracle.com>



>   
>   # Use single metadata profile so we only need to corrupt one copy of tree block
>   _scratch_mkfs -m single > $seqres.full
diff mbox series

Patch

diff --git a/tests/btrfs/295 b/tests/btrfs/295
index a9a8e5530a80..00a5c5680b86 100755
--- a/tests/btrfs/295
+++ b/tests/btrfs/295
@@ -12,6 +12,8 @@  _begin_fstest auto quick dangerous
 . ./common/filter
 _supported_fs btrfs
 _require_scratch
+# Directly writing to the device, which may not work with a zoned device
+_require_non_zoned_device "$SCRATCH_DEV"
 
 # Use single metadata profile so we only need to corrupt one copy of tree block
 _scratch_mkfs -m single > $seqres.full