]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: Add FIEMAP support for efficient sparse file copy
authorJie Liu <jeff.liu@oracle.com>
Thu, 13 May 2010 14:09:30 +0000 (22:09 +0800)
committerJim Meyering <meyering@redhat.com>
Fri, 28 Jan 2011 22:28:37 +0000 (23:28 +0100)
commitb66ee767ef31c71ae90e8473275d617cdbf96302
tree8b32c4fc42588b9c4693ae7c1666633d8e0bc36d
parent68a734d66bbe72d5d4133c386fa77069dd77fb8c
cp: Add FIEMAP support for efficient sparse file copy

* src/fiemap.h: Add fiemap.h for fiemap ioctl(2) support.
Copied from linux's include/linux/fiemap.h, with minor formatting changes.
* src/copy.c (copy_reg): Now, when `cp' invoked with --sparse=[WHEN] option, we
will try to do FIEMAP-copy if the underlaying file system support it, fall back
to a normal copy if it fails.
src/copy.c
src/fiemap.h [new file with mode: 0644]