Red Hat Bugzilla – Bug 1284906
cp will corrupt sparse files with trailing extents
Last modified: 2016-11-04 03:40:06 EDT
cp will corrupt copies of a file that has: 1. a hole up to the apparent size of the file. 2. an extent after the apparent EOF. To reproduce: echo blabla > sparse_falloc.in truncate -s 2M sparse_falloc.in fallocate -n -o 4M -l 1M sparse_falloc.in cp sparse_falloc.in sparse_falloc.out cmp sparse_falloc.in sparse_falloc.out || echo corrupt Upstream backportable fix is at: http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=patch;h=eea6b49
Thanks Pádraig for heads-up.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2497.html