From: Joel Becker <Joel.Becker@oracle.com>
To: Jim Meyering <jim@meyering.net>
Cc: bug-coreutils@gnu.org, linux-btrfs@vger.kernel.org,
"Pádraig Brady" <P@draigBrady.com>,
"Giuseppe Scrivano" <gscrivano@gnu.org>,
"Chris Mason" <chris.mason@oracle.com>
Subject: Re: BTRFS file clone support for cp
Date: Thu, 30 Jul 2009 01:21:54 -0700 [thread overview]
Message-ID: <20090730082153.GC2435@mail.oracle.com> (raw)
In-Reply-To: <87fxcevcuy.fsf@meyering.net>
On Thu, Jul 30, 2009 at 09:39:17AM +0200, Jim Meyering wrote:
> Joel Becker wrote:
> > I've cooked up 'ln -r' for reflinks, which works for ln(1) but
> > not for cp(1).
>
> Thanks. I haven't looked, but after reading about the reflink syscall
> [http://lwn.net/Articles/332802/] had come to the same conclusion:
> this feature belongs with ln rather than with cp.
>
> Besides, putting the new behavior on a new option avoids
> the current semantic change we would otherwise induce in cp.
Well, I don't see any reason cp(1) can't take advantage of
reflink(2). I just think that cp(1) should look at reflink(2) as an
optimization, not a specific methodology.
What do I mean? If you want to say "I know what a reflink is,
and that's exactly what I want", you want "ln -r". But say you want a
"cp --snap" that tries to take a snapshot regardless of the backend. It
could use reflink(2) on filesystems that support it, or perhaps a
passthrough call to the underlying storage, or who knows what. I can
also imagine a "cp --shallow" that is "if you can cow, do it, otherwise
do a normal cp".
Joel
--
"I think it would be a good idea."
- Mahatma Ghandi, when asked what he thought of Western
civilization
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2009-07-30 8:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87d47o3fip.fsf@master.homenet>
[not found] ` <4A6CEA48.5050208@draigBrady.com>
[not found] ` <8763defuvq.fsf@meyering.net>
[not found] ` <87ws5tvrq8.fsf@master.homenet>
2009-07-27 23:40 ` BTRFS file clone support for cp Pádraig Brady
2009-07-28 20:06 ` Giuseppe Scrivano
2009-07-29 13:01 ` Chris Mason
2009-07-29 14:14 ` Pádraig Brady
2009-07-29 16:10 ` Chris Mason
2009-07-29 16:18 ` Chris Mason
2009-07-29 18:14 ` Pádraig Brady
2009-07-30 0:57 ` Joel Becker
2009-07-30 7:39 ` Jim Meyering
2009-07-30 8:21 ` Joel Becker [this message]
2009-07-30 8:40 ` Pádraig Brady
2009-07-30 16:28 ` Ric Wheeler
2009-07-30 16:48 ` Jim Meyering
2009-07-30 9:26 ` Andi Kleen
2009-07-30 10:02 ` Pádraig Brady
2009-07-30 10:16 ` Jim Meyering
2009-07-30 10:21 ` Tomasz Chmielewski
2009-07-30 10:54 ` Andi Kleen
2009-07-30 18:05 ` Joel Becker
2009-07-30 23:28 ` Pádraig Brady
[not found] ` <87k51r9sxh.fsf@master.homenet>
[not found] ` <4A70C4E0.9030104@draigBrady.com>
2009-07-30 17:28 ` Giuseppe Scrivano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090730082153.GC2435@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=P@draigBrady.com \
--cc=bug-coreutils@gnu.org \
--cc=chris.mason@oracle.com \
--cc=gscrivano@gnu.org \
--cc=jim@meyering.net \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.