On Thu, Jul 24, 2014 at 02:38:51PM +0300, Rakesh Pandit wrote: > ioctl(FIGETBSZ) was used to get block size earlier but 2508eaa7 > (filefrag: improvements to filefrag FIEMAP handling) moved to fstatfs > f_bsize which doesn't work well for many files systems. > > Block size returned using fstatfs isn't block size but "optimal > transfer block size" as per man page. Even stat st_blksize is > "preferred I/O block size" and in may file systems it may even vary > from file to file (POSIX). This patch returns back usage of FIGETBSZ > to get block size. For file systems which don't support FIEMAP, this > fixes the number of FIBMAP ioctl calls required. > > Signed-off-by: Rakesh Pandit <rakesh@xxxxxxxxxx> Thanks, applied. I added fallback where if FIGETBSZ fails for some reason, filefrag will now fall back to using f_bsize. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html