[LTP] [PATCH v2 09/10] syscalls/ioctl_loop07: Add dio with logic block size error test
Yang Xu
xuyang2018.jy@cn.fujitsu.com
Thu Apr 23 12:12:28 CEST 2020
Hi Cyril
> Hi Cyril
>
>
>> Hi!
>> This test fails for me, i.e. the attempt to enabe direct IO succeeds. I
>> will have to have a closer look later on.
> Now, I use 5.7.0-rc2 kernel to test, this case fails, I guess loop
> driver has changed its logic. I am trying.
I write this test on fedora31(tmp directory use tmpfs), so I got a
pseudo pass when setting dio.
I misunderstood the meaning of the comment in the kernel.
kernel commet as below:
"We support direct I/O only if lo_offset is aligned with the
logical I/O size of backing device, and the logical block
size of loop is bigger than the backing device's and the loop
needn't transform transfer."
sb_bsize = bdev_logical_block_size(inode->i_sb->s_bdev); //get block
size from backing device
dio_align = sb_bsize - 1;
I use logic block size of loop(1024 > 512) , so this test pass.
Now, I think this test is meaningless and we can remove this.
Best Regards
Yang Xu
>
> ps: when run ioctl_loop01.c, I also met another problem that
> /dev/loop0p1 and the corresponding sys file doesn't existed. dmesg
> report error "loop_reread_partitions: partition scan of loop0 () failed
> (rc=-16)". Also trying .
>>
More information about the ltp
mailing list