Re: [PATCH] src/t_stripealign.c: Use block size reported by fstatfs()

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



On Wed, Nov 21, 2018 at 09:56:46PM +0530, Chandan Rajendra wrote:
> On ppc64le, block size reported by fstat(2) is 64k (the page size)
> i.e. the "preferred I/O size". However src/t_stripealign.c requires the
> actual block size of the filesystem. Hence this commit now makes use of
> the block size reported by fstatfs(2) syscall.
> 
> Signed-off-by: Chandan Rajendra <chandan@xxxxxxxxxxxxxxxxxx>

Looks like that only XFS returns the preferred iosize
(xfs_preferred_iosize()) on stat(2), other filesystems will return block
size (I checked the code of ext4, f2fs, ocfs2).

On the other hand, statfs(2) returns the actual block size on all
filesystems I've checked, including XFS. So this patch looks fine to me.

Thanks,
Eryu



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux