GNU bug report logs - #6048
[coreutils] Re: Feature: add ocfs2 reflink to cp(1)

Previous Next

Package: coreutils;

Reported by: "jeff.liu" <jeff.liu <at> oracle.com>

Date: Tue, 27 Apr 2010 09:32:02 UTC

Severity: normal

Merged with 11443

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Pádraig Brady <P <at> draigBrady.com>
To: Kai Petzke <petzke <at> teltarif.de>
Cc: 6048 <at> debbugs.gnu.org, Georg Schmitz <schmitz <at> teltarif.de>
Subject: Re: bug#11443: linux "cp" and ocfs2 reflink/clone/fastcopy/copy on
	write
Date: Mon, 14 May 2012 14:19:42 +0100
[Message part 1 (text/plain, inline)]
I've merged this back to bug 6048

On 05/09/2012 03:28 PM, Kai Petzke wrote:
> Hello,
> 
> 
> there has been work by others about adding support for the OCFS2 "reflink" ioctl() call, which is similiar to the btrfs "clone" call, and creates a copy-on-write copy of the original, thus allowing to "copy" even gigabyte sized files within a tiny fraction of a second, and without using much additional file system space. See:
>     http://lists.gnu.org/archive/html/coreutils/2011-08/msg00046.html
>     http://lists.gnu.org/archive/html/bug-coreutils/2010-04/msg00185.html
> 
> I have updated those patches to work against coreutils 8.16, removed those bugs, that I spotted. In particular, if the destination file exists, the "reflink" ist automatically tried again after removing it, and if not all attributes are copied, it is made sure, that the following open() system call does not truncate the just created copy.
> 
> I strongly suggest including that patch in the coreutils package,

I'm less enthused about adding this as it doesn't fit very cleanly.

> even though the interface to use to different system calls to achieve the same thing is awkward.
> But, as laid out in the comments in the source, btrfs clone and ocfs2 reflink are semantically
> quite different, so that unifying them into one on the kernel side is not likely to happen, soon, if it happens at all.

That would be unfortunate. Hopefully a generic reflink() call can be sorted out.

> If users don't use the --reflink option of "cp", the additional code makes no difference, so it doesn't hurt.

Fair point.

> And if users use "--reflink" on either of the supported file systems, they get a huge advantage out of it!

I really dislike that xattrs are copied unconditionally.
It might be best to auto clear xattrs after the "reflink", if possible?

cheers,
Pádraig.
[coreutils-8.16-ocfs2-reflink.diff (text/plain, attachment)]

This bug report was last modified 6 years and 204 days ago.

Previous Next


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