Hay

Known issue: LTP syscalls ioctl_loop06

Description

ioctl_loop06: update loopback block size validation

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 Reviewed-by: Petr Vorel pvorel@suse.cz Tested-by: Avinesh Kumar akumar@suse.de

Links: - https://github.com/linux-test-project/ltp/commit/e2bbba0c113df07da76496dff282866af03105d3 - https://linaro.atlassian.net/browse/LKQ-2426

Labels
First seen Feb. 26, 2025, 10:48 a.m.
Last seen June 5, 2025, 7:08 a.m.

Incidents