cp: copy sparse files efficiently using the FIEMAP ioctl
commitdff2b95e4fb22f3e6f3360da0774c784d2f50ff9
authorJie Liu <jeff.liu@oracle.com>
Thu, 13 May 2010 14:09:30 +0000 (13 22:09 +0800)
committerJim Meyering <meyering@redhat.com>
Sun, 30 Jan 2011 19:44:10 +0000 (30 20:44 +0100)
tree0df1f00b386be479f508a947a5159c57065b390e
parent38cdb01a32ba386a42c370be8371a8bf884eacce
cp: copy sparse files efficiently using the FIEMAP ioctl

* 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' is invoked with --sparse=[WHEN],
we will try to do FIEMAP-copy if the underlying file system
supports it, and fall back to a normal copy if it fails.
src/copy.c
src/fiemap.h [new file with mode: 0644]