fibmap returns bogus data on FAT
Brought to you by:
ideguy
FAT filesystem doesn't use filesystem blocksize for FIBMAP block lists. It uses 512-byte blocks.
The correct way to get the filesystem block size in kernel is the FIGETBSZ ioctl, defined in kernel headers as:
#define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */
Using this ioctl returns the correct value also for FAT filesystem.
I've attached a patch for the latest hdparm.
Fixed in 9.42 thanks.