[LTP] [PATCH v3] syscalls/ioctl_loop05: Use correct blockdev to get logical_block_size

Jan Stancek jstancek@redhat.com
Wed Jun 24 15:06:12 CEST 2020


----- Original Message -----
> Looking at what that command does it's not that complex. It does
> statfs() to get minor and major number, then scans /proc/self/mountinfo
> for these, since these are on third column and then just prints whatever
> it's in the 10th column. This isn't more complex that what we have here
> and avoids needs to execute binaries and parse the output.

Thanks for mountinfo pointer. We went down the stat() route already,
but hit issues with some filesystems. I tried it now with mountinfo
approach and that does seem to fix btrfs case too, so I agree that
parsing /proc/self/mountinfo rather than df output is nicer.



More information about the ltp mailing list