coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cp: remove empty file on reflink failure


From: Fridolin Pokorny
Subject: cp: remove empty file on reflink failure
Date: Tue, 12 Aug 2014 16:37:04 +0200
User-agent: KMail/4.13.3 (Linux/3.15.7-200.fc20.x86_64; KDE/4.13.3; x86_64; ; )

Hi,

I am proposing two patches to solve an issue when copying reflink on
a non-btrfs file system. This issue was already previously discussed [1, 2].

The first one cleans only on a reflink creation failure. The second one was
based on the previously refused patch [2] and it is more general solution.

I am not sure if this behavior is considered to be a bug. There is no
specification what to do in situations like this and whether the empty file
should be left or unlinked [3]. Nevertheless it would be nice to handle this
issue.

Have a nice day!
Fridolin Pokorny

[1] https://bugzilla.redhat.com/show_bug.cgi?id=921708
[2] http://lists.gnu.org/archive/html/coreutils/2013-03/msg00056.html
[3] http://pubs.opengroup.org/onlinepubs/007904875/utilities/cp.html

Attachment: cp-general-unlink.patch
Description: Text Data

Attachment: cp-reflink-unlink.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]