[PATCH 0/13] add SMB2 server-side copy support - V2

David Disseldorp ddiss at samba.org
Tue Nov 13 08:16:24 MST 2012


This change-set adds support for the FSCTL_SRV_COPYCHUNK and
FSCTL_SRV_REQUEST_RESUME_KEY server-side copy SMB2 ioctls, allowing
for network round-trip avoidance during a file copy, i.e.:
http://www.samba.org/~ddiss/slides/snappery_samba/img17.html

Changes since V1:
- Replace failure returns with torture_fail()/_skip()
- Free tevent subreq after receive, rather than waiting for parent recv
- Remove unneeded subreq from vfs_time_audit.c copychunk state
- Alloc tevent reqs for copychunk tracking in skel VFS example code
- Minor white space and debug output cleanups

Feedback appreciated.

Cheers, David


The following changes since commit 6f47497610352f72128bdbcd3b45313ea9a265ab:

  lib/ldb: add missing newline in the output of ldb_ldif_write_trace() (2012-11-13 13:53:31 +0100)

are available in the git repository at:

  git://git.samba.org/ddiss/samba.git copy_chunk_no_btrfs_v2

for you to fetch changes up to 7caeaf1d192dd1ae50288c391dd530a0a0cb89e2:

  smb2_ioctl: only pass through to VFS on a valid fsp (2012-11-13 15:21:42 +0100)

----------------------------------------------------------------
David Disseldorp (13):
      smb2_ioctl: split ioctl handlers into separate funtions
      smb2_ioctl: split ioctl handler code on device type
      smb2_ioctl: add FSCTL_SRV_REQUEST_RESUME_KEY support
      s3-vfs: add copy_chunk vfs hooks
      smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK
      smb2_ioctl: remove ioctl error response assumption
      selftest: enable samba3.smb2.ioctl tests against s3fs
      torture: skip FSCTL_SRV_ENUM_SNAPS test when not supported
      smbd: split out file_fsp_get from file_fsp_smb2
      smb2_ioctl: perform locking around copychunk requests
      torture: add locking tests for copychunk
      torture: replace ioctl failure returns with helper calls
      smb2_ioctl: only pass through to VFS on a valid fsp

 docs-xml/manpages/vfs_full_audit.8.xml |    2 +
 examples/VFS/skel_opaque.c             |   42 ++++++++++
 examples/VFS/skel_transparent.c        |   75 ++++++++++++++++++
 libcli/smb/smb_constants.h             |    2 +
 selftest/knownfail                     |   16 ++--
 selftest/skip                          |    1 -
 source3/Makefile.in                    |    5 ++
 source3/include/vfs.h                  |   25 +++++-
 source3/include/vfs_macros.h           |   10 +++
 source3/modules/vfs_default.c          |   71 +++++++++++++++++
 source3/modules/vfs_full_audit.c       |   38 +++++++++
 source3/modules/vfs_time_audit.c       |   85 ++++++++++++++++++++
 source3/smbd/files.c                   |   34 +++++---
 source3/smbd/proto.h                   |    3 +
 source3/smbd/smb2_ioctl.c              |  422 +++++++++++++++++--------------------------------------------------------------------------------
 source3/smbd/smb2_ioctl_dfs.c          |  158 +++++++++++++++++++++++++++++++++++++
 source3/smbd/smb2_ioctl_filesys.c      |   77 ++++++++++++++++++
 source3/smbd/smb2_ioctl_named_pipe.c   |  194 +++++++++++++++++++++++++++++++++++++++++++++
 source3/smbd/smb2_ioctl_network_fs.c   |  569 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 source3/smbd/smb2_ioctl_private.h      |   54 +++++++++++++
 source3/smbd/vfs.c                     |   26 +++++-
 source3/wscript_build                  |    5 ++
 source4/libcli/smb2/ioctl.c            |   29 ++++++-
 source4/torture/smb2/ioctl.c           |  302 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 24 files changed, 1847 insertions(+), 398 deletions(-)
 create mode 100644 source3/smbd/smb2_ioctl_dfs.c
 create mode 100644 source3/smbd/smb2_ioctl_filesys.c
 create mode 100644 source3/smbd/smb2_ioctl_named_pipe.c
 create mode 100644 source3/smbd/smb2_ioctl_network_fs.c
 create mode 100644 source3/smbd/smb2_ioctl_private.h




More information about the samba-technical mailing list