[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: BTRFS file clone support for cp
From: |
Joel Becker |
Subject: |
Re: BTRFS file clone support for cp |
Date: |
Thu, 30 Jul 2009 01:21:54 -0700 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
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: address@hidden
Phone: (650) 506-8127
- Re: BTRFS file clone support for cp, (continued)
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/27
- Re: BTRFS file clone support for cp, Giuseppe Scrivano, 2009/07/27
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/27
- Re: BTRFS file clone support for cp, Giuseppe Scrivano, 2009/07/28
- Re: BTRFS file clone support for cp, Chris Mason, 2009/07/29
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/29
- Re: BTRFS file clone support for cp, Chris Mason, 2009/07/29
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/29
- Re: BTRFS file clone support for cp, Joel Becker, 2009/07/30
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/30
- Re: BTRFS file clone support for cp,
Joel Becker <=
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/30
- Re: BTRFS file clone support for cp, Ric Wheeler, 2009/07/30
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/30
- Re: BTRFS file clone support for cp, Andi Kleen, 2009/07/30
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/30
- Re: BTRFS file clone support for cp, Jim Meyering, 2009/07/30
- Re: BTRFS file clone support for cp, Andi Kleen, 2009/07/30
- Re: BTRFS file clone support for cp, Joel Becker, 2009/07/30
- Re: BTRFS file clone support for cp, Pádraig Brady, 2009/07/30
- Re: BTRFS file clone support for cp, Tomasz Chmielewski, 2009/07/30