Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs/333: require scratch before checking encoded reads
@ 2026-08-31 10:42 Prabhakar Pujeri
  2026-08-31 17:21 ` Darrick J. Wong
  2026-08-31 23:09 ` Qu Wenruo
  0 siblings, 2 replies; 3+ messages in thread
From: Prabhakar Pujeri @ 2026-08-31 10:42 UTC (permalink / raw)
  To: fstests
  Cc: Prabhakar Pujeri, Zorro Lang, Anand Jain, Filipe Manana,
	linux-btrfs

_require_btrfs_iouring_encoded_read() formats and mounts the scratch
device while checking for encoded-read support.  Without a configured
scratch device, the test therefore fails before reaching its existing
_require_scratch call.

Move _require_scratch before the encoded-read check so the test is skipped
before its first scratch operation.

Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
---
 tests/btrfs/333 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/btrfs/333 b/tests/btrfs/333
index 6214d7c..9dcdf1c 100755
--- a/tests/btrfs/333
+++ b/tests/btrfs/333
@@ -13,6 +13,7 @@ _begin_fstest auto quick compress rw io_uring ioctl
 
 _require_command src/btrfs_encoded_read
 _require_command src/btrfs_encoded_write
+_require_scratch
 _require_btrfs_iouring_encoded_read
 # Encoded writes are reject for inodes with the NODATASUM flag, so we must skip
 # the test if running with either the nodatasum or nodatacow (which implies
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs/333: require scratch before checking encoded reads
  2026-08-31 10:42 [PATCH] btrfs/333: require scratch before checking encoded reads Prabhakar Pujeri
@ 2026-08-31 17:21 ` Darrick J. Wong
  2026-08-31 23:09 ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2026-08-31 17:21 UTC (permalink / raw)
  To: Prabhakar Pujeri
  Cc: fstests, Zorro Lang, Anand Jain, Filipe Manana, linux-btrfs

On Mon, Aug 31, 2026 at 10:42:00AM +0000, Prabhakar Pujeri wrote:
> _require_btrfs_iouring_encoded_read() formats and mounts the scratch
> device while checking for encoded-read support.  Without a configured
> scratch device, the test therefore fails before reaching its existing
> _require_scratch call.
> 
> Move _require_scratch before the encoded-read check so the test is skipped
> before its first scratch operation.
> 
> Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>

That looks right to me,
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  tests/btrfs/333 | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tests/btrfs/333 b/tests/btrfs/333
> index 6214d7c..9dcdf1c 100755
> --- a/tests/btrfs/333
> +++ b/tests/btrfs/333
> @@ -13,6 +13,7 @@ _begin_fstest auto quick compress rw io_uring ioctl
>  
>  _require_command src/btrfs_encoded_read
>  _require_command src/btrfs_encoded_write
> +_require_scratch
>  _require_btrfs_iouring_encoded_read
>  # Encoded writes are reject for inodes with the NODATASUM flag, so we must skip
>  # the test if running with either the nodatasum or nodatacow (which implies
> -- 
> 2.55.0
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] btrfs/333: require scratch before checking encoded reads
  2026-08-31 10:42 [PATCH] btrfs/333: require scratch before checking encoded reads Prabhakar Pujeri
  2026-08-31 17:21 ` Darrick J. Wong
@ 2026-08-31 23:09 ` Qu Wenruo
  1 sibling, 0 replies; 3+ messages in thread
From: Qu Wenruo @ 2026-08-31 23:09 UTC (permalink / raw)
  To: Prabhakar Pujeri, fstests
  Cc: Zorro Lang, Anand Jain, Filipe Manana, linux-btrfs



在 2026/8/31 20:12, Prabhakar Pujeri 写道:
> _require_btrfs_iouring_encoded_read() formats and mounts the scratch
> device while checking for encoded-read support.  Without a configured
> scratch device, the test therefore fails before reaching its existing
> _require_scratch call.

In that case it's better to just add _require_scratch to 
_require_btrfs_iouring_encoded_read(), instead of changing every 
possible caller.

BTW, without a scratch device, more than half of the tests will be 
skipped, thus it may not provide much coverage for such runs.

Thanks,
Qu

> 
> Move _require_scratch before the encoded-read check so the test is skipped
> before its first scratch operation.
> 
> Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
> ---
>   tests/btrfs/333 | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/tests/btrfs/333 b/tests/btrfs/333
> index 6214d7c..9dcdf1c 100755
> --- a/tests/btrfs/333
> +++ b/tests/btrfs/333
> @@ -13,6 +13,7 @@ _begin_fstest auto quick compress rw io_uring ioctl
>   
>   _require_command src/btrfs_encoded_read
>   _require_command src/btrfs_encoded_write
> +_require_scratch
>   _require_btrfs_iouring_encoded_read
>   # Encoded writes are reject for inodes with the NODATASUM flag, so we must skip
>   # the test if running with either the nodatasum or nodatacow (which implies


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-31 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 10:42 [PATCH] btrfs/333: require scratch before checking encoded reads Prabhakar Pujeri
2026-08-31 17:21 ` Darrick J. Wong
2026-08-31 23:09 ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox