s3-vfs: add copy_chunk vfs hooks
commitef00eb90e56dfac2d823582cec92abf1fa9905f1
authorDavid Disseldorp <ddiss@suse.de>
Tue, 15 Jan 2013 16:22:59 +0000 (15 17:22 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 16 Jan 2013 22:15:06 +0000 (16 23:15 +0100)
tree3a582f5ce6ae0a1da9e55de2a380a79fa4bd8bdd
parent2bde9636888067210dc38523b6fafaa0b179ec3b
s3-vfs: add copy_chunk vfs hooks

copy_chunk copies n bytes from a source file at a specific offset to a
destination file at a given offset. This interface will be used in
handling smb2 FSCTL_SRV_COPYCHUNK ioctl requests.

Use a pread/pwrite loop in vfs_default, so that requests referring to
the same src and dest file are possible.

Provide send and receive hooks for copy chunk VFS interface, allowing
asynchronous behaviour.

Check whether the request source offset + length exceeds the current
size. Return STATUS_INVALID_VIEW_SIZE under such a condition, matching
Windows server behaviour.

Reviewed by: Jeremy Allison <jra@samba.org>
docs-xml/manpages/vfs_full_audit.8.xml
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_time_audit.c
source3/smbd/vfs.c