linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cp --reflink and target file open flags
@ 2013-10-16 23:36 Steve French
  2013-10-17 10:45 ` David Disseldorp
  0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2013-10-16 23:36 UTC (permalink / raw)
  To: linux-fsdevel, samba-technical,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, LKML

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 course I can write an SMB2/SMB3
specific copy command, but it would be preferable to allow use of cp
--reflink since so many people are familiar with it.

There is quite a bit of flexibility in server side copy offload  -
more than cp an offer, especially when using SMB3 or later dialects
(e.g. in number of chunks sent at one time, chunk size, attributes
copied, and even whether to use T10 style offload), but still it would
be nice to support "cp --reflink" over the network.  Any ideas on
this?

After looking at copy.c in coreutils for cp - I couldn't think of any
trivial way to force cp to open the target RW.

Ideas?

-- 
Thanks,

Steve

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

end of thread, other threads:[~2013-10-17 18:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-16 23:36 cp --reflink and target file open flags Steve French
2013-10-17 10:45 ` David Disseldorp
     [not found]   ` <20131017124515.3566d7c1-k1XZOR0ctBLN0uC3ymp8PA@public.gmane.org>
2013-10-17 18:27     ` Shirish Pargaonkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).