[LTP] [PATCH v4] ioctl_loop06: update loopback block size validation

Li Wang liwang@redhat.com
Fri Apr 11 12:08:05 CEST 2025


Hi Avinesh, All,

On Fri, Apr 11, 2025 at 4:38 PM Avinesh Kumar <akumar@suse.de> wrote:

> On Friday, March 14, 2025 12:58:48 PM CEST Li Wang wrote:
> > The kernel commit 47dd6753 ("block/bdev: lift block size restrictions to
> 64k")
> > now supports block sizes larger than PAGE_SIZE, with a new upper limit of
> > BLK_MAX_BLOCK_SIZE (64K). But ioctl_loop06 still assumes that PAGE_SIZE
> is the
> > maximum allowed block size, causing failures on newer kernels(>= 6.14):
> >
> >   ioctl_loop06.c:74: TINFO: Using LOOP_SET_BLOCK_SIZE with arg >
> PAGE_SIZE
> >   ioctl_loop06.c:57: TFAIL: Set block size succeed unexpectedly
> >   ...
> >   ioctl_loop06.c:74: TINFO: Using LOOP_CONFIGURE with block_size >
> PAGE_SIZE
> >   ioctl_loop06.c:57: TFAIL: Set block size succeed unexpectedly
> >
> > This patch updates ioctl_loop06 to use BLK_MAX_BLOCK_SIZE instead of
> PAGE_SIZE
> > for block size validation.
> >
> > And, dynamically sets bs based on BLK_MAX_BLOCK_SIZE, using 1024 bytes
> if it's
> > below 1MB or scaling it otherwise. Ensures tst_fill_file() writes
> efficiently
> > while maintaining compatibility across different kernel versions.
> >
> > Signed-off-by: Li Wang <liwang@redhat.com>
> > Cc: Luis Chamberlain <mcgrof@kernel.org>
> > Cc: Christoph Hellwig <hch@lst.de>
> > Cc: Hannes Reinecke <hare@suse.de>
>
> Tested-by: Avinesh Kumar <akumar@suse.de>
>

Thanks for testing. I thought this one was merged, but when I checked the
log, it was not.
Anyway, I pushed it now.


-- 
Regards,
Li Wang


More information about the ltp mailing list