Re: [PATCH] generic/366: check minimum dio size correctly

Christoph Hellwig <[email protected]> Tue, 16 Jun 2026 07:28:31 +0200
Newsgroups org.kernel.vger.fstests
Message-ID <[email protected]>
On Tue, Jun 16, 2026 at 04:13:22AM +0800, Zorro Lang wrote:
> Oh, if we only need to run it once, how about:
> 
> blksz=""
> for (( i = 0; i < $iterations; i++)); do
>     ...
>     if [ -z "$blksz" ];then
> 	    blksz=`$here/src/min_dio_alignment $SCRATCH_MNT $SCRATCH_DEV`
>         if [[ $blksz -gt 512 ]]; then
>             _notrun "512 byte dio alignment required"
>         fi
>     fi
> ...

I can look into it.  But to me this doesn't really seem worth the
effort as calling min_dio_alignment is so cheap compared to the
mount/unmount cycle never mind everything else we do in the loop.