diff mbox series

btrfs/220: zoned: skip nodatacow mount option for zoned btrfs

Message ID 20220607080635.4010254-1-naohiro.aota@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs/220: zoned: skip nodatacow mount option for zoned btrfs | expand

Commit Message

Naohiro Aota June 7, 2022, 8:06 a.m. UTC
The nodatacow mount option is not allowed on zoned btrfs and failing the
test. Skip the cases for zoned btrfs.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
---
 tests/btrfs/220 | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

Comments

Filipe Manana June 7, 2022, 10:03 a.m. UTC | #1
On Tue, Jun 07, 2022 at 05:06:35PM +0900, Naohiro Aota wrote:
> The nodatacow mount option is not allowed on zoned btrfs and failing the
> test. Skip the cases for zoned btrfs.
> 
> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>

Reviewed-by: Filipe Manana <fdmanana@suse.com>

Looks good, thanks.

> ---
>  tests/btrfs/220 | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/btrfs/220 b/tests/btrfs/220
> index fa91a38493af..4d94ccd6eee2 100755
> --- a/tests/btrfs/220
> +++ b/tests/btrfs/220
> @@ -265,14 +265,16 @@ test_revertible_options()
>  	test_roundtrip_mount "compress=zlib:20" "compress=zlib:9" "compress=zstd:16" "compress=zstd:15"
>  	test_roundtrip_mount "compress-force=lzo" "compress-force=lzo" "compress-force=zlib:4" "compress-force=zlib:4"
>  
> -	# on remount, if we only pass datacow after nodatacow was used it will remain with nodatasum
> -	test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datacow,datasum" "$DEFAULT_OPTS"
> -	# nodatacow disabled compression
> -	test_roundtrip_mount "compress-force" "compress-force=zlib:3" "nodatacow" "nodatasum,nodatacow"
> -
> -	# nodatacow disabled both datacow and datasum, and datasum enabled datacow and datasum
> -	test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datasum" "$DEFAULT_OPTS"
> -	test_roundtrip_mount "nodatasum" "nodatasum" "datasum" "$DEFAULT_OPTS"
> +	if ! _scratch_btrfs_is_zoned; then
> +		# on remount, if we only pass datacow after nodatacow was used it will remain with nodatasum
> +		test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datacow,datasum" "$DEFAULT_OPTS"
> +		# nodatacow disabled compression
> +		test_roundtrip_mount "compress-force" "compress-force=zlib:3" "nodatacow" "nodatasum,nodatacow"
> +
> +		# nodatacow disabled both datacow and datasum, and datasum enabled datacow and datasum
> +		test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datasum" "$DEFAULT_OPTS"
> +		test_roundtrip_mount "nodatasum" "nodatasum" "datasum" "$DEFAULT_OPTS"
> +	fi
>  
>  	test_should_fail "discard=invalid"
>  	if [ "$enable_discard_sync" = true ]; then
> -- 
> 2.35.1
>
diff mbox series

Patch

diff --git a/tests/btrfs/220 b/tests/btrfs/220
index fa91a38493af..4d94ccd6eee2 100755
--- a/tests/btrfs/220
+++ b/tests/btrfs/220
@@ -265,14 +265,16 @@  test_revertible_options()
 	test_roundtrip_mount "compress=zlib:20" "compress=zlib:9" "compress=zstd:16" "compress=zstd:15"
 	test_roundtrip_mount "compress-force=lzo" "compress-force=lzo" "compress-force=zlib:4" "compress-force=zlib:4"
 
-	# on remount, if we only pass datacow after nodatacow was used it will remain with nodatasum
-	test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datacow,datasum" "$DEFAULT_OPTS"
-	# nodatacow disabled compression
-	test_roundtrip_mount "compress-force" "compress-force=zlib:3" "nodatacow" "nodatasum,nodatacow"
-
-	# nodatacow disabled both datacow and datasum, and datasum enabled datacow and datasum
-	test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datasum" "$DEFAULT_OPTS"
-	test_roundtrip_mount "nodatasum" "nodatasum" "datasum" "$DEFAULT_OPTS"
+	if ! _scratch_btrfs_is_zoned; then
+		# on remount, if we only pass datacow after nodatacow was used it will remain with nodatasum
+		test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datacow,datasum" "$DEFAULT_OPTS"
+		# nodatacow disabled compression
+		test_roundtrip_mount "compress-force" "compress-force=zlib:3" "nodatacow" "nodatasum,nodatacow"
+
+		# nodatacow disabled both datacow and datasum, and datasum enabled datacow and datasum
+		test_roundtrip_mount "nodatacow" "nodatasum,nodatacow" "datasum" "$DEFAULT_OPTS"
+		test_roundtrip_mount "nodatasum" "nodatasum" "datasum" "$DEFAULT_OPTS"
+	fi
 
 	test_should_fail "discard=invalid"
 	if [ "$enable_discard_sync" = true ]; then