[PATCH] smb2 FSCTL_SRV_COPYCHUNK support
David Disseldorp
ddiss at suse.de
Mon Mar 5 07:44:47 MST 2012
Hi,
On Wed, 15 Feb 2012 09:29:32 -0800
Jeremy Allison <jra at samba.org> wrote:
> On Wed, Feb 15, 2012 at 04:05:39PM +0100, Volker Lendecke wrote:
...
> > The _send/_recv
> > model makes it possible to keep the main engine
> > single-threaded but opens up the possibility to do a
> > threaded implementation in the VFS. See for example the
> > vfs_aio_pthread module that Jeremy added lately. It still
> > uses the posix AIO based VFS calls, but I think those should
> > be converted to pread_send/recv and pwrite_send/recv, hiding
> > the ugliness of the Posix API in some default module.
>
> +1 for that. If we had pread[write]_send() and pread[write]_recv()
> this code could become a lot simpler (and possibly on by default)
> in smbd.
Thanks for the feedback so far. I've push a new round of changes which
add copy chunk _send and _recv VFS hooks, allowing for simplified async
implementations. The existing vfs_default and vfs_btrfs copy chunk
back-ends remain synchronous.
A few other changes have been made since the previous push:
- rebased to master
- changed chunk limits to match Windows Server 2k8
- squashed a number of commits
Any further feedback, particularly regarding the async architecture,
would be much appreciated.
Cheers, David
http://git.samba.org/?p=ddiss/samba.git;a=shortlog;h=refs/heads/smb2_copychunk_async_rb5
The following changes since commit 14d31376aab703dbb14d1cd786baeaf84361cd96:
s3-lsasd: Fix debug messages on registration failure (2012-03-05 09:50:17 +0100)
are available in the git repository at:
git://git.samba.org/ddiss/samba.git smb2_copychunk_async_rb5
David Disseldorp (9):
s3-smb2: split ioctl handlers into separate functions
s3-smb2: split ioctl handler code on device type
s3-ioctl: fix smb2 named pipe ioctl handler
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-vfs: add vfs_btrfs module
s3-server: remove smb2 ioctl error response assumption
s4-torture: skip FSCTL_SRV_ENUM_SNAPS test when not supported
examples/VFS/skel_opaque.c | 21 ++
examples/VFS/skel_transparent.c | 22 ++
libcli/smb/smb_constants.h | 2 +
selftest/skip | 1 -
source3/Makefile.in | 11 +
source3/configure.in | 13 +
source3/include/vfs.h | 25 ++-
source3/include/vfs_macros.h | 10 +
source3/modules/vfs_btrfs.c | 142 +++++++++++
source3/modules/vfs_default.c | 65 +++++
source3/modules/vfs_full_audit.c | 34 +++
source3/modules/wscript_build | 9 +
source3/selftest/tests.py | 2 +-
source3/smbd/smb2_ioctl.c | 425 ++++++---------------------------
source3/smbd/smb2_ioctl_dfs.c | 119 ++++++++++
source3/smbd/smb2_ioctl_filesys.c | 49 ++++
source3/smbd/smb2_ioctl_named_pipe.c | 164 +++++++++++++
source3/smbd/smb2_ioctl_network_fs.c | 433 ++++++++++++++++++++++++++++++++++
source3/smbd/smb2_ioctl_private.h | 54 +++++
source3/smbd/vfs.c | 26 ++-
source3/wscript | 11 +
source3/wscript_build | 5 +
source4/libcli/smb2/ioctl.c | 29 ++-
source4/torture/smb2/ioctl.c | 68 +++++-
24 files changed, 1383 insertions(+), 357 deletions(-)
create mode 100644 source3/modules/vfs_btrfs.c
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