|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0014228||CentOS-7||kernel||public||2017-12-04 13:59||2017-12-07 14:42|
|Target Version||Fixed in Version|
|Summary||0014228: cp --reflink=always fails with "Operation not supported"|
In a CentOS 7 VM with kernel 3.10.0-693.5.2.el7.x86_64 including a mounted disk formatted with BTRFS and btrfs-progs v4.9.1.
When executing a copy of files with the command "cp --reflink=always" the command fails with the indication "failed to clone 'someFile': Operation not supported"
The above-mentioned copy fails, but in the files are created with zero bytes in the destination folder.
While trying to find the cause, it seems to be some bug in the ioctl operation. A strace log of the copy operation can be found in the uploaded files.
This problem only manifests itself in the kernel 3.10.0-693.5.2.el7.x86_64. If the same operation is executed in the system with the kernel 3.10.0-514.2.2.el7.x86_64 all goes well.
More evidence that this is probably a bug introduced in this version of the kernel can be found in the git repository in the first commit of the new kernel. (link: https://git.centos.org/commit/rpms!kernel.git/d6bfd60741b14479a15b43acaa1ea5a8d73df543)
In the file "SPECS/kernel.spec" line 15011 (link: https://git.centos.org/blob/rpms!kernel.git/d6bfd60741b14479a15b43acaa1ea5a8d73df543/SPECS!kernel.spec#L15011) that some changes were made in the ioctl - "[fs] btrfs: fix uninit variable in clone ioctl (Bill O'Donnell) "
As a workaround, an older version of the kernel can be used, but this is not optimal, as future releases may have the same problem.
|Steps To Reproduce||In a BTRFS mount:|
dd if=/dev/urandom of=testb bs=1024k seek=1024 count=128
cp --reflink=always testb testb_copy
|Tags||btrfs, bug, coreutils, kernel|
|Please post this issue to RedHats bugzilla (please also add a cross-reference for bug IDs) together with your findings. Once RH fixes this in the kernel, CentOS will inherit the fix.|
|Issue was reported in Red Hat bugzilla with ID 1520492.|
CentOS Linux release 7.3.1611 (Core) 3.10.0-693.el7.x86_64
CentOS Linux release 7.4.1708 (Core) 3.10.0-693.2.2.el7.x86_64
CentOS Linux release 7.3.1611 (Core) 3.10.0-693.5.2.el7.x86_64
CentOS Linux release 7.4.1708 (Core) 3.10.0-693.5.2.el7.centos.plus.x86_64
CentOS Linux release 7.4.1708 (Core) 3.10.0-693.11.1.el7.x86_64
CentOS Linux release 7.3.1611 (Core) 3.10.0-514.26.2.el7.x86_64
CentOS Linux release 7.4.1708 (Core) 4.14.4-1.el7.elrepo.x86_64
CentOS Linux release 7.3.1611 (Core) 4.4.104-1.el7.elrepo.x86_64
CentOS Linux release 7.4.1708 (Core) 4.4.104-1.el7.elrepo.x86_64
Thanks for that info.
Since the bug I reported in the Red Hat Bugzilla is private and I can't change that. I posted this findings in there. I'm hoping that someone will be assigned soon.
|People that can see the bug can add other email addresses to the list and then those people can see the bug too...|
|Just for completeness: The last 3 kernels are not CentOS-kernels. But its good to know this got "introduced" with 7.4.|
|2017-12-04 13:59||lumitesi||New Issue|
|2017-12-04 13:59||lumitesi||File Added: strace_log|
|2017-12-04 13:59||lumitesi||Tag Attached: bug|
|2017-12-04 13:59||lumitesi||Tag Attached: coreutils|
|2017-12-04 13:59||lumitesi||Tag Attached: kernel|
|2017-12-04 14:02||tigalch||Note Added: 0030698|
|2017-12-04 16:22||lumitesi||Note Added: 0030699|
|2017-12-07 07:41||markusheitz||Note Added: 0030717|
|2017-12-07 12:36||lumitesi||Note Added: 0030720|
|2017-12-07 12:42||lumitesi||Tag Attached: btrfs|
|2017-12-07 14:38||TrevorH||Note Added: 0030721|
|2017-12-07 14:42||tigalch||Note Added: 0030722|