Re: cp --reflink and target file open flags

2013-10-17 Thread Shirish Pargaonkar
I think it would not matter which ioctl is used if the target file is not opened with flag O_RDWR. Perhaps cifs.ko can make the decision to change O_WRONLY to O_RDWR based on the flag and location of the source and destination files. On Thu, Oct 17, 2013 at 5:45 AM, David Disseldorp wrote: > On

Re: cp --reflink and target file open flags

2013-10-17 Thread David Disseldorp
On Wed, 16 Oct 2013 18:36:19 -0500 Steve French wrote: > cp --reflink opens the target file for O_WRONLY before invoking the > (BTRFS) ioctl for clone file, but for copy offload over the network > the SMB2 specification requires that the target file be open O_RDWR. > > I may be able to upgrade t

cp --reflink and target file open flags

2013-10-16 Thread Steve French
cp --reflink opens the target file for O_WRONLY before invoking the (BTRFS) ioctl for clone file, but for copy offload over the network the SMB2 specification requires that the target file be open O_RDWR. I may be able to upgrade the target file handle on the fly by reopening it in cifs.ko, and of