From: Chris Mason <chris.mason@oracle.com>
To: Andreas Barth <aba@not.so.argh.org>
Cc: Sage Weil <sage@newdream.net>, linux-btrfs@vger.kernel.org
Subject: Re: cp --reflink with Btrfs
Date: Thu, 28 Jan 2010 16:09:06 -0500 [thread overview]
Message-ID: <20100128210906.GC30822@think> (raw)
In-Reply-To: <20100127105322.GA1983@mails.so.argh.org>
On Wed, Jan 27, 2010 at 11:53:22AM +0100, Andreas Barth wrote:
> * Sage Weil (sage@newdream.net) [091216 17:55]:
> > On Wed, 16 Dec 2009, Li Dongyang wrote:
> >
> > > Have a look at line 998, ioctl.c, inside btrfs_ioctl_clone(),
> > > the src->i_size(the size of the testfile created by touch) is just 0, and this
> > > will cause btrfs_ioctl_clone just return -EINVAL.
> > > I'm not sure if it makes sense to clone a file which actually doesn't have any
> > > data extents.
> >
> > Probably not, but it seems more consistent to return success instead than
> > -EINVAL. Requiring the caller to check and special case empty files isn't
> > very friendly...
>
>
> Actually it makes lots of sense if trying to e.g. cow-copy an chroot
> on an buildd, and there are some empty files inside of the linux
> installation (which normally just are).
>
> Can I hope on getting the patch (or another patch) incorporated into
> the kernel?
In this case the application is responsible for duplicating the file.
The clone ioctl doesn't actually clone any of the file metadata or
anything else.
-chris
next prev parent reply other threads:[~2010-01-28 21:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-27 10:53 cp --reflink with Btrfs Andreas Barth
2010-01-28 21:09 ` Chris Mason [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-12-13 0:29 Jason White
2009-12-14 16:23 ` Josef Bacik
2009-12-15 23:37 ` Jason White
2009-12-16 6:27 ` Li Dongyang
2009-12-16 17:55 ` Sage Weil
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=20100128210906.GC30822@think \
--to=chris.mason@oracle.com \
--cc=aba@not.so.argh.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=sage@newdream.net \
/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.