public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* cp --reflink with Btrfs
@ 2009-12-13  0:29 Jason White
  2009-12-14 16:23 ` Josef Bacik
  0 siblings, 1 reply; 7+ messages in thread
From: Jason White @ 2009-12-13  0:29 UTC (permalink / raw)
  To: linux-btrfs

I am testing a Btrfs root file system with Debian (kernel 2.6.32) under KVM.

jason@vrtl:~$ touch testfile
jason@vrtl:~$ cp --reflink testfile /tmp
cp: failed to clone `/tmp/testfile': Invalid argument

This is with GNU Coreutils 8.0 taken from debian Sid.

Is this a Coreutils issue, a Btrfs problem or something in my local
configuration?

All the other issues that I have encountered so far are known limitations, for
example, lack of Btrfs support in Grub 2 and the current inability of the
initrd scripts from Debian to recognize the file system type. All of this will
be fixed, no doubt, over time.

Also, if this is the wrong list for such questions, I would appreciate a
reference to the preferred mailing list.

Thank you for an excellent project which is very important to the future of
file systems under Linux.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: cp --reflink with Btrfs
@ 2010-01-27 10:53 Andreas Barth
  2010-01-28 21:09 ` Chris Mason
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Barth @ 2010-01-27 10:53 UTC (permalink / raw)
  To: Sage Weil; +Cc: linux-btrfs

* 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?



Cheers,
Andi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-01-28 21:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-13  0:29 cp --reflink with Btrfs 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
  -- strict thread matches above, loose matches on Subject: below --
2010-01-27 10:53 Andreas Barth
2010-01-28 21:09 ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox