I need to determine the sector range(s) occupied by a file on a disk device (for Linux). Let's assume it's a simple disk (no RAID) with MBR or GPT partition table.
I learned that I can get the position of a file within the file system using FIBMAP
ioctl. How do I translate the data returned by FIBMAP
into LBA sectors of the disk? Thank you