[LTP] [PATCH] syscalls/ioctl_loop05: Get the logic_block_size dynamically
Jan Stancek
jstancek@redhat.com
Tue Jun 9 11:24:13 CEST 2020
----- Original Message -----
> In loop driver code, the sb_bsize was calculated as below
> sb_bsize = bdev_logical_block_size(inode->i_sb->s_bdev),
>
> it is the super block's block size that the backing file's inode belongs to,
> not by using the st_blksize member of stat struct(it uses inode->i_blkbits).
I'm not sure I follow the above, are you saying the difference is bdev blksize
vs. filesystem blksize? Is the test failing in some scenarios or is this
fix based on code inspection?
>
> IMO, we don't have the direct ioctl to get this size, just try it from 512 to
> page_size.
Would BLKSSZGET work? It returns bdev_logical_block_size().
More information about the ltp
mailing list