That reminds me, we should be avoiding types like uint64_t unless they're really needed. The fiemap code is bound tightly to the Linux kernel so I guess uint64_t is OK there, but the portable code should use higher-level types like off_t. I installed the attached patch. No doubt further cleanups like this could be made but one thing at a time.