GNU bug report logs - #56392
`cp --reflink=always` creates empty file on failure

Previous Next

Package: coreutils;

Reported by: Benjamin Gilbert <bgilbert <at> backtick.net>

Date: Tue, 5 Jul 2022 08:16:02 UTC

Severity: normal

Merged with 56391

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56392 in the body.
You can then email your comments to 56392 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#56392; Package coreutils. (Tue, 05 Jul 2022 08:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Benjamin Gilbert <bgilbert <at> backtick.net>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 05 Jul 2022 08:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Benjamin Gilbert <bgilbert <at> backtick.net>
To: bug-coreutils <at> gnu.org
Subject: `cp --reflink=always` creates empty file on failure
Date: Tue, 5 Jul 2022 03:41:29 -0400
Hi,

When `cp --reflink=always` fails because the filesystem does not
support reflinks, I'd expect it not to leave anything at the
destination path.  However, it appears to leave an empty file instead:

$ ls -l
total 0
$ echo "some data" > src
$ cp --reflink=always src dest
cp: failed to clone 'dest' from 'src': Operation not supported
$ ls -l
total 4
-rw-rw-r--. 1 bgilbert bgilbert  0 Jul  5 01:27 dest
-rw-rw-r--. 1 bgilbert bgilbert 10 Jul  5 01:27 src

I'm seeing this on both coreutils 9.0 (Fedora 36) and 9.1.31-fa332
built from Git.

Best,
--Benjamin Gilbert




Merged 56391 56392. Request was from Benjamin Gilbert <bgilbert <at> backtick.net> to control <at> debbugs.gnu.org. (Tue, 05 Jul 2022 12:27:02 GMT) Full text and rfc822 format available.

Forcibly Merged 56391 56392. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Thu, 07 Jul 2022 15:40:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 05 Aug 2022 11:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 47 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.