Bug#561225: coreutils: cp --reflink fails with Btrfs file system

2009-12-16 Thread Jim Meyering
Jason White wrote: Jim Meyering j...@meyering.net wrote: Can you rerun that via strace and send the log at least to the bug-coreutils list (Cc'd)? strace -o log cp --reflink testfile testfile2 It opens both files and then performs the ioctl() call: ioctl(4, 0x40049409, 0x3)

Bug#561225: coreutils: cp --reflink fails with Btrfs file system

2009-12-16 Thread Jason White
From discussion on the Btrfs list, the reason for this behaviour is that, if the file is empty (thus containing no data extents) the ioctl() call returns EINVAL. It has been suggested on the Btrfs list that it should return success instead, so that the caller doesn't have to check for the empty

Bug#561225: coreutils: cp --reflink fails with Btrfs file system

2009-12-15 Thread Jason White
Package: coreutils Version: 8.0-2 Severity: normal ja...@vrtl:~$ touch testfile ja...@vrtl:~$ cp --reflink testfile testfile2 cp: failed to clone `testfile2': Invalid argument I am running kernel 2.6.32 with a Btrfs root file system under KVM, x86-64 architecture. It was suggested on the Btrfs

Bug#561225: coreutils: cp --reflink fails with Btrfs file system

2009-12-15 Thread Jim Meyering
Jason White wrote: Package: coreutils Version: 8.0-2 ja...@vrtl:~$ touch testfile ja...@vrtl:~$ cp --reflink testfile testfile2 cp: failed to clone `testfile2': Invalid argument I am running kernel 2.6.32 with a Btrfs root file system under KVM, x86-64 architecture. It was suggested on

Bug#561225: coreutils: cp --reflink fails with Btrfs file system

2009-12-15 Thread Pádraig Brady
On 15/12/09 13:00, Jim Meyering wrote: Jason White wrote: Package: coreutils Version: 8.0-2 ja...@vrtl:~$ touch testfile ja...@vrtl:~$ cp --reflink testfile testfile2 cp: failed to clone `testfile2': Invalid argument I am running kernel 2.6.32 with a Btrfs root file system under KVM, x86-64

Bug#561225: coreutils: cp --reflink fails with Btrfs file system

2009-12-15 Thread Jason White
Jim Meyering j...@meyering.net wrote: Can you rerun that via strace and send the log at least to the bug-coreutils list (Cc'd)? strace -o log cp --reflink testfile testfile2 It opens both files and then performs the ioctl() call: ioctl(4, 0x40049409, 0x3) = -1 EINVAL