You should probably give "hdparm --fibmap xxxx" a try on the empeg first, just to make sure that FIBMAP actually works there. smile

Assuming it does, then the code you'll need is much, much simpler than what hdparm uses. Assuming your file is 1024 bytes (or less) in size, there will be only a single disk block, and it will always be present (after creating/fsyncing the file).

So no need to handle tail-packed files, "holes", or any such extravagances.

Cheers