All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] generic/366: check minimum dio size correctly
@ 2026-06-08  7:00 Christoph Hellwig
  2026-06-14 18:58 ` Zorro Lang
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2026-06-08  7:00 UTC (permalink / raw)
  To: zlang; +Cc: fstests

min_dio_alignment requires the file system to be checked to be mounted,
so move the call into the main loop.  Drop the pointless blocksize
argument to _require_odirect, which is only tested on the test device.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/generic/366 | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/generic/366 b/tests/generic/366
index 271a01bc2eac..ef69bf09d6ff 100755
--- a/tests/generic/366
+++ b/tests/generic/366
@@ -20,7 +20,7 @@ _begin_fstest auto quick rw
 . ./common/filter
 
 _require_scratch
-_require_odirect 512	# see fio job1 config below
+_require_odirect
 _require_aio
 
 _fixed_by_fs_commit btrfs xxxxxxxxxxxx \
@@ -30,7 +30,7 @@ iterations=$((32 * LOAD_FACTOR))
 
 fio_config=$tmp.fio
 fio_out=$tmp.fio.out
-blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
+
 cat >$fio_config <<EOF
 [global]
 bs=8k
@@ -60,6 +60,12 @@ _require_fio $fio_config
 for (( i = 0; i < $iterations; i++)); do
 	_scratch_mkfs >>$seqres.full 2>&1
 	_scratch_mount
+
+	blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
+	if [[ $blksz -gt 512 ]]; then
+		_notrun "512 byte dio alignment required"
+	fi
+
 	# There's a known EIO failure to report collisions between directio and buffered
 	# writes to userspace, refer to upstream linux 5a9d929d6e13. So ignore EIO error
 	# at here.
-- 
2.53.0


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

* Re: [PATCH] generic/366: check minimum dio size correctly
  2026-06-08  7:00 [PATCH] generic/366: check minimum dio size correctly Christoph Hellwig
@ 2026-06-14 18:58 ` Zorro Lang
  2026-06-15 13:33   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Zorro Lang @ 2026-06-14 18:58 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: fstests

On Mon, Jun 08, 2026 at 09:00:10AM +0200, Christoph Hellwig wrote:
> min_dio_alignment requires the file system to be checked to be mounted,
> so move the call into the main loop.  Drop the pointless blocksize
> argument to _require_odirect, which is only tested on the test device.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/generic/366 | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/generic/366 b/tests/generic/366
> index 271a01bc2eac..ef69bf09d6ff 100755
> --- a/tests/generic/366
> +++ b/tests/generic/366
> @@ -20,7 +20,7 @@ _begin_fstest auto quick rw
>  . ./common/filter
>  
>  _require_scratch
> -_require_odirect 512	# see fio job1 config below
> +_require_odirect
>  _require_aio
>  
>  _fixed_by_fs_commit btrfs xxxxxxxxxxxx \
> @@ -30,7 +30,7 @@ iterations=$((32 * LOAD_FACTOR))
>  
>  fio_config=$tmp.fio
>  fio_out=$tmp.fio.out
> -blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
> +
>  cat >$fio_config <<EOF
>  [global]
>  bs=8k
> @@ -60,6 +60,12 @@ _require_fio $fio_config
>  for (( i = 0; i < $iterations; i++)); do
>  	_scratch_mkfs >>$seqres.full 2>&1
>  	_scratch_mount
> +
> +	blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
> +	if [[ $blksz -gt 512 ]]; then
> +		_notrun "512 byte dio alignment required"
> +	fi

Do we need to check this in every iteration?

> +
>  	# There's a known EIO failure to report collisions between directio and buffered
>  	# writes to userspace, refer to upstream linux 5a9d929d6e13. So ignore EIO error
>  	# at here.
> -- 
> 2.53.0
> 

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

* Re: [PATCH] generic/366: check minimum dio size correctly
  2026-06-14 18:58 ` Zorro Lang
@ 2026-06-15 13:33   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-06-15 13:33 UTC (permalink / raw)
  To: Christoph Hellwig, fstests

On Mon, Jun 15, 2026 at 02:58:11AM +0800, Zorro Lang wrote:
> > +	blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
> > +	if [[ $blksz -gt 512 ]]; then
> > +		_notrun "512 byte dio alignment required"
> > +	fi
> 
> Do we need to check this in every iteration?

We don't, but we also don't want to do an extra mount just to check
the feature.


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

end of thread, other threads:[~2026-06-15 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08  7:00 [PATCH] generic/366: check minimum dio size correctly Christoph Hellwig
2026-06-14 18:58 ` Zorro Lang
2026-06-15 13:33   ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.