[PATCH] smb2 FSCTL_SRV_COPYCHUNK support

David Disseldorp ddiss at suse.de
Tue Oct 11 07:36:30 MDT 2011


Hi,

This set of changes adds support for the FSCTL_SRV_COPYCHUNK server side
copy operation and the FSCTL_SRV_REQUEST_RESUME_KEY prerequisite.
Corresponding smbtorture tests are also included (these make up the
majority of the changes).

A copy_chunk vfs hook is added for the particular benefit of btrfs backed
shares, which can harness the awesomeness of BTRFS_IOC_CLONE_RANGE.

Generic smb2 ioctl error path fixes are still pending (we currently
incorrectly assume an error response packet on ioctl failure), but for
now I'd like to get some more eyes over the changes.

Cheers, David
--

http://git.samba.org/?p=ddiss/samba.git;a=shortlog;h=refs/heads/smb2_copychunk_rb2

The following changes since commit fea02ce1771ddb2ee09a442a86def72a01b9582e:

  ldb:ldb_autotransaction_request - error string shouldn't be set here (2011-10-11 10:15:18 +0200)

are available in the git repository at:
  git://git.samba.org/ddiss/samba.git smb2_copychunk_rb2

David Disseldorp (15):
      idl: add copychunk and request_resume_key ioctl definitions
      s4-torture: Add tests for the smb2 copychunk ioctl
      s3-smb2: split ioctl handlers into separate functions
      s3-server: add smb2 FSCTL_SRV_REQUEST_RESUME_KEY support
      s3-vfs: add copy_chunk vfs hook
      s3-server: add support for smb2 FSCTL_SRV_COPYCHUNK
      s3-server: use dev/inode file id as copychunk resume key
      s3-server: report copychunk limits in invalid param response
      s4-torture: split common copychunk ioctl test code into helper
      split out common copychunk response check code
      s4-torture: add smb2 copychunk ioctl tests
      s3-vfs: add vfs_btrfs module
      s4-torture: add smb2 copychunk ioctl tests
      s3-server: tevent_req_post() in common ioctl handler
      s4-torture: smb2 copychunk data integrity checks

 examples/VFS/skel_opaque.c         |   12 +
 examples/VFS/skel_transparent.c    |   13 +
 librpc/idl/ioctl.idl               |   33 ++
 librpc/idl/wscript_build           |    2 +-
 librpc/wscript_build               |    5 +
 source3/Makefile.in                |    7 +
 source3/configure.in               |   13 +
 source3/include/vfs.h              |   15 +
 source3/include/vfs_macros.h       |    5 +
 source3/modules/vfs_btrfs.c        |   77 +++++
 source3/modules/vfs_default.c      |   28 ++
 source3/modules/vfs_full_audit.c   |   20 ++
 source3/modules/wscript_build      |    9 +
 source3/smbd/smb2_ioctl.c          |  585 ++++++++++++++++++++++-------------
 source3/smbd/vfs.c                 |   13 +
 source3/wscript                    |   11 +
 source3/wscript_build              |    2 +-
 source4/torture/smb2/ioctl.c       |  584 +++++++++++++++++++++++++++++++++++-
 source4/torture/smb2/wscript_build |    2 +-
 19 files changed, 1214 insertions(+), 222 deletions(-)
 create mode 100644 librpc/idl/ioctl.idl
 create mode 100644 source3/modules/vfs_btrfs.c


More information about the samba-technical mailing list