On Nov 04, 2023 / 21:17, Akinobu Mita wrote: > The miniublk always sets the logical block size to 512 bytes when setting > a regular file-backed loop target. > A test fails if the regular file is on a filesystem built on a block > device with a logical block size of 4KB. > > $ cd blktests > $ modprobe -r scsi_debug > $ modprobe scsi_debug sector_size=4096 dev_size_mb=2048 > $ mkfs.ext4 /dev/sdX > $ mount /dev/sdX results/ > $ ./check ublk/003 > > The logical block size of the ublk block device is set to 512 bytes, > so a request that is not 4KB aligned may occur, and the miniublk will > attempt to process it with direct IO and fail. > > The original ublk program already fixed this problem by determining > the logical block size to set based on the block device to which the > target regular file belongs. > > Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> I've applied it. Thanks!