Re: cp --reflink with Btrfs

2010-01-28 Thread Chris Mason
On Wed, Jan 27, 2010 at 11:53:22AM +0100, Andreas Barth wrote: * Sage Weil (s...@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

Re: cp --reflink with Btrfs

2010-01-27 Thread Andreas Barth
* Sage Weil (s...@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

Re: cp --reflink with Btrfs

2009-12-16 Thread Sage Weil
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

Re: cp --reflink with Btrfs

2009-12-15 Thread Jason White
Josef Bacik jo...@redhat.com wrote: On Sun, Dec 13, 2009 at 12:29:03AM +, Jason White wrote: I am testing a Btrfs root file system with Debian (kernel 2.6.32) under KVM. ja...@vrtl:~$ touch testfile ja...@vrtl:~$ cp --reflink testfile /tmp cp: failed to clone `/tmp/testfile': Invalid

Re: cp --reflink with Btrfs

2009-12-15 Thread Li Dongyang
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. On Wednesday

Re: cp --reflink with Btrfs

2009-12-14 Thread Josef Bacik
On Sun, Dec 13, 2009 at 12:29:03AM +, Jason White wrote: I am testing a Btrfs root file system with Debian (kernel 2.6.32) under KVM. ja...@vrtl:~$ touch testfile ja...@vrtl:~$ cp --reflink testfile /tmp cp: failed to clone `/tmp/testfile': Invalid argument This is with GNU Coreutils