Re: [blktests v1] block: add test for io_uring Protection Information (PI) interface using FS_IOC_GETLBMD_CAP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Aug 11, 2025 / 16:33, Anuj Gupta/Anuj Gupta wrote:
> On 8/8/2025 5:10 PM, Shinichiro Kawasaki wrote:
> > On Aug 05, 2025 / 11:46, Anuj Gupta wrote:
> >> This test verifies end-to-end support for integrity metadata via the
> >> io-uring interface. It uses the FS_IOC_GETLBMD_CAP ioctl to query the
> >> logical block metadata capabilities of the device. These values are then
> >> passed to fio using the md_per_io_size option.
> >>
> >> io_uring PI interface: https://lore.kernel.org/all/20241128112240.8867-1-anuj20.g@xxxxxxxxxxx/
> >> fio support for interface: https://lore.kernel.org/all/20250725175808.2632-2-vincent.fu@xxxxxxxxxxx/
> >> ioctl: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/log/?h=vfs-6.17.integrity
> >> Signed-off-by: Anuj Gupta <anuj20.g@xxxxxxxxxxx>
> >> Signed-off-by: Vincent Fu <vincent.fu@xxxxxxxxxxx>
> > 
> > Anuj, thank you for the patch.
> > 
> > I wonder which test group this test case should go into, block or nvme. IIUC,
> > this test case runs only for nvme devices. Said that, block group looks good for
> > me since the test target ioctl interface belongs to the block layer.
> > 
> > I tried to run the test case using QEMU NVME emulation devices with some
> > ms=X,pi=Y options, but the test runs failed. The kernel reported a number of
> > "protection error"s. Can we run the test case with QEMU NVME emulation device?
> > If so, could you share the recommended set up of the device?
> 
> Could you please share/paste the errors that you encountered?

The errors were as follows:

block/041 => nvme1n1 (io_uring read with PI metadata buffer on block device) [failed]
    runtime    ...  0.354s
    --- tests/block/041.out     2025-08-13 19:56:15.487074413 +0900
    +++ /home/shin/Blktests/blktests/results/nvme1n1/block/041.out.bad  2025-08-13 20:06:23.199291948 +0900
    @@ -1,2 +1,12 @@
     Running block/041
    +fio: io_u error on file /dev/nvme1n1: Invalid or incomplete multibyte or wide character: read offset=12288, buflen=4096
    +fio: io_u error on file /dev/nvme1n1: Invalid or incomplete multibyte or wide character: read offset=688128, buflen=4096
    +fio: io_u error on file /dev/nvme1n1: Invalid or incomplete multibyte or wide character: read offset=630784, buflen=4096
    +fio: io_u error on file /dev/nvme1n1: Invalid or incomplete multibyte or wide character: read offset=905216, buflen=4096
    +fio: io_u error on file /dev/nvme1n1: Invalid or incomplete multibyte or wide character: read offset=233472, buflen=4096
    +fio: io_u error on file /dev/nvme1n1: Invalid or incomplete multibyte or wide character: read offset=540672, buflen=4096
    ...
    (Run 'diff -u tests/block/041.out /home/shin/Blktests/blktests/results/nvme1n1/block/041.out.bad' to see the entire diff)

> 
> The issue occurs because setting ms and pi in the QEMU command line is
> not enough, the namespace still needs to be formatted. Could you please
> run the test again after running the nvme format command on device with 
> the desired LBA format (PI enabled).

Ah, thanks. I ran "nvme format -i 1 /dev/nvme0n1" for the QEMU NVME device
prepared with QEMU NVME option "ms=8,pi=1", then the test case passes. The
test case looks working as expected :)




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux