cp: support btrfs' copy-on-write file clone operation
authorGiuseppe Scrivano <gscrivano@gnu.org>
Sat, 25 Jul 2009 14:35:27 +0000 (16:35 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 29 Jul 2009 10:15:50 +0000 (12:15 +0200)
commit45330176690b079ed47ac7c58f29a1b028f97b07
tree2f0f4637db6debaec9ed57e9b98584413893be4b
parent095861179cad632893106670226a4658199a4f95
cp: support btrfs' copy-on-write file clone operation

* src/copy.c [HAVE_SYS_IOCTL_H]: Include <sys/ioctl.h>.
(BTRFS_IOCTL_MAGIC, BTRFS_IOC_CLONE): Define.
(clone_file): New function.
(copy_reg): Use the btrfs clone operation if possible.
src/copy.c