public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Ric Wheeler <rwheeler@redhat.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Jim Meyering <jim@meyering.net>,
	Chris Mason <chris.mason@oracle.com>,
	Giuseppe Scrivano <gscrivano@gnu.org>,
	bug-coreutils@gnu.org, linux-btrfs@vger.kernel.org
Subject: Re: BTRFS file clone support for cp
Date: Thu, 30 Jul 2009 12:28:16 -0400	[thread overview]
Message-ID: <4A71CA20.2070906@redhat.com> (raw)
In-Reply-To: <4A715C61.1080607@draigBrady.com>

On 07/30/2009 04:40 AM, P=C3=A1draig Brady wrote:
> Jim Meyering wrote:
>   =20
>> Joel Becker wrote:
>>
>>     =20
>>> On Wed, Jul 29, 2009 at 07:14:37PM +0100, P=C3=A1draig Brady wrote:
>>>       =20
>>>> At the moment we have these linking options:
>>>>
>>>> cp -l, --link #for hardlinks
>>>> cp -s, --symbolic-link #for symlinks
>>>>
>>>> So perhaps we should support:
>>>>
>>>> cp --link=3D{soft,hard,cow}
>>>> for symlink(), link() and reflink() respectively?
>>>> I.E. link to the name, inode or extents respectively.
>>>>         =20
>>> 	I've cooked up 'ln -r' for reflinks, which works for ln(1) but
>>> not for cp(1).
>>>       =20
>> Thanks.  I haven't looked, but after reading about the reflink sysca=
ll
>> [http://lwn.net/Articles/332802/] had come to the same conclusion:
>> this feature belongs with ln rather than with cp.
>>     =20
>
> Right. It definitely should be in ln anyway.
>
>   =20
>> Besides, putting the new behavior on a new option avoids
>> the current semantic change we would otherwise induce in cp.
>>     =20
>
> Yes doing reflink() in cp by default currently can
> be problematic as discussed, especially on mechanical hard disks.
> Though in future I can see most users of cp preferring
> reflink() to be done, rather than read()/write(). Ponder...
>
>   =20

I think that doing reflink by default would be a horrible idea - one=20
good reason to copy a file is to increase your level of fault tolerance=
=20
and reflink magically avoids that :-)

reflink is a neat feature, but should be used on purpose in my opinion,

ric

> In any case putting --link=3Dcow or --reflink or whatever in cp
> could be very useful for creating writeable snapshot branches.
>
> cheers,
> P=C3=A1draig.
>   =20

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-07-30 16:28 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
2009-07-30  8:40                       ` Pádraig Brady
2009-07-30 16:28                         ` Ric Wheeler [this message]
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=4A71CA20.2070906@redhat.com \
    --to=rwheeler@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox