Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#46 fibmap returns bogus data on FAT

closed-fixed
nobody
None
5
2012-09-28
2011-07-03
Massimo Maggi
No

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.

Discussion

  • Massimo Maggi
    Massimo Maggi
    2011-07-03

     
    Attachments
  • Mark Lord
    Mark Lord
    2012-09-28

    • status: open --> closed-fixed
     
  • Mark Lord
    Mark Lord
    2012-09-28

    Fixed in 9.42 thanks.