#780006 coreutils: cp --reflink doesn't work on OCFS2

Package:
coreutils
Source:
coreutils
Description:
GNU core utilities
Submitter:
"brian m. carlson"
Date:
2015-03-08 00:18:06 UTC
Severity:
normal
#780006#5
Date:
2015-03-08 00:15:10 UTC
From:
To:
The info page description for cp --reflink states, "Perform a
lightweight, copy-on-write (COW) copy, if supported by the file system."

OCFS2 supports reflinking and it works quite well.  Unfortunately, cp
uses the BTRFS ioctl, which unsurprisingly doesn't work on OCFS2.  This
causes me to waste a large amount of time copying multi-gigabyte disk
images, when it could happen almost instantaneously.

The code should be changed to work on all file systems that support it,
preferably in a generic way.