From: Joel Becker <Joel.Becker@oracle.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Chris Mason <chris.mason@oracle.com>,
Giuseppe Scrivano <gscrivano@gnu.org>,
Jim Meyering <jim@meyering.net>,
bug-coreutils@gnu.org, linux-btrfs@vger.kernel.org
Subject: Re: BTRFS file clone support for cp
Date: Wed, 29 Jul 2009 17:57:03 -0700 [thread overview]
Message-ID: <20090730005702.GA32157@mail.oracle.com> (raw)
In-Reply-To: <4A70918D.6020003@draigBrady.com>
On Wed, Jul 29, 2009 at 07:14:37PM +0100, P=E1draig Brady wrote:
> Chris Mason wrote:
> > On Wed, Jul 29, 2009 at 03:14:49PM +0100, P=E1draig Brady wrote:
> >>
> >> We may need to play around with fallocate()
> >> if we want to get back to the original
> >> cp semantics of actually allocating space
> >> on the file system for the new file.
> >
> > Well, best to just use the original cp code. I was talking with
> > Giuseppe about this as well, I think we should the option to do reg=
ular
> > cp via a flag.
>=20
> Right. Well we can turn off this cloning by doing --sparse=3D{never,a=
lways}
> but that has side effects. If we need an option then maybe we should =
have
> it turn on cloning rather than restore default cp behaviour?
> The side effects I thought of earlier, of COW without corresponding a=
llocation
> were possible fragmentation on write or unexpected/mishandled ENOSPC.
> Also for endangered mechanical disks, subsequent processing could
> be slowed as the head seeks between the old and new data to be copied=
=2E
> Perhaps these are a small price to pay, especially considering that
> solid state disks will only be affected by the write()=3DENOSPC issue=
=2E
>=20
> At the moment we have these linking options:
>=20
> cp -l, --link #for hardlinks
> cp -s, --symbolic-link #for symlinks
>=20
> So perhaps we should support:
>=20
> cp --link=3D{soft,hard,cow}
> for symlink(), link() and reflink() respectively?
> I.E. link to the name, inode or extents respectively.
I've cooked up 'ln -r' for reflinks, which works for ln(1) but
not for cp(1). I have a git tree with the (in-flux) code on
oss.oracle.com:
[View]
http://oss.oracle.com/git/?p=3Djlbec/reflink.git;a=3Dsummary
[Pull]
git://oss.oracle.com/git/jlbec/reflink.git master
This repository isn't designed to be an authorative patch for
coreutils. Instead it provides a reflink(1) program that is actually l=
n
-r in disguise. Later work would be to get coreutils updated
"properly".
Joel
--=20
"This is the end, beautiful friend.
This is the end, my only friend the end
Of our elaborate plans, the end
Of everything that stands, the end
No safety or surprise, the end
I'll never look into your eyes again."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
--
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
next prev parent reply other threads:[~2009-07-30 0:57 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 [this message]
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
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=20090730005702.GA32157@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox