bug-coreutils
[Top][All Lists]
Advanced

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

bug#11443: linux "cp" and ocfs2 reflink/clone/fastcopy/copy on write


From: Kai Petzke
Subject: bug#11443: linux "cp" and ocfs2 reflink/clone/fastcopy/copy on write
Date: Wed, 9 May 2012 16:28:27 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

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, 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. If users don't use the --reflink option of "cp", the additional code makes no difference, so it doesn't hurt. And if users use "--reflink" on either of the supported file systems, they get a huge advantage out of it!


Greetings


Kai Petzke
www.teltarif.de - Kommunikation ganz einfach

--


teltarif.de Onlineverlag GmbH
Alt-Moabit 96c, 10559 Berlin
Tel:  +49 (0)30 453 081-0
Fax:  +49 (0)30 453 081-11
Mail: address@hidden
WWW:  www.teltarif.de

Unsere Profile im Social Web:
www.facebook.com/teltarif
www.twitter.com/teltarif

Geschäftsführer: Kai Petzke, Martin Müller
eingetragen beim Amtsgericht Berlin-Charlottenburg, HRB 70507
Umsatzsteuer-ID: DE201038407

Nachhaltiger Erfolg durch Werbung auf teltarif.de:
Inhaltliches und regionales Targeting, Frequency Capping etc., sowie
ein großes Publikum mit hoher Affinität zum E-Commerce!

weitere Informationen: http://www.teltarif.de/mediadaten

Attachment: coreutils-8.16-ocfs2-reflink.diff
Description: Text Data


reply via email to

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