Hello, I'd like to introduce fiemap(available in mainline kernel-2.6.27 at least) to cp/mv commands for efficient sparse file copy.
For the filesytems with FIEMAP supported, call ioctl(..FS_IOC_FIEMAP) could return the extents info mapped to a file except holes. This would result in much faster backups for any kind of sparse files. For now, it works for some simple tests against cp(1), any help tests are appreciated! I like to send out the patches for your guys review, the test scripts will be added to coreutils/tests and send out soon. I'll add the fiemap support for mv(1) once the above functions become stable. Any comments are welcomed! Best Regards, -Jeff
