]> Pileus Git - ~andy/linux/commit
CIFS: SMB2/SMB3 Copy offload support (refcopy) phase 1
authorSteve French <smfrench@gmail.com>
Thu, 14 Nov 2013 06:05:36 +0000 (00:05 -0600)
committerSteve French <smfrench@gmail.com>
Thu, 14 Nov 2013 06:05:36 +0000 (00:05 -0600)
commit41c1358e9181ab1ebd773905b3fa8039b61aa0e9
tree144d08d6758ac33212c200421a973120910c6fc8
parent2c957ddf30897787e39462ac56cdc4bf21eb0465
CIFS: SMB2/SMB3 Copy offload support (refcopy) phase 1

This first patch adds the ability for us to do a server side copy
(ie fast copy offloaded to the server to perform, aka refcopy)

"cp --reflink"

of one file to another located on the same server.  This
is much faster than traditional copy (which requires
reading and writing over the network and extra
memcpys).

This first version is not going to be copy
files larger than about 1MB (to Samba) until I add
support for multiple chunks and for autoconfiguring
the chunksize.

It includes:
1) processing of the ioctl
2) marshalling and sending the SMB2/SMB3 fsctl over the network
3) simple parsing of the response

It does not include yet (these will be in followon patches to come soon):
1) support for multiple chunks
2) support for autoconfiguring and remembering the chunksize
3) Support for the older style copychunk which Samba 4.1 server supports
(because this requires write permission on the target file, which
cp does not give you, apparently per-posix).  This may require
a distinct tool (other than cp) and other ioctl to implement.

Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifsglob.h
fs/cifs/ioctl.c
fs/cifs/smb2ops.c
fs/cifs/smb2pdu.h