s3-vfs: add copy_chunk vfs hooks
authorDavid Disseldorp <ddiss@suse.de>
Tue, 15 Jan 2013 16:22:59 +0000 (17:22 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Mon, 15 Apr 2013 16:15:13 +0000 (18:15 +0200)
commit25ce1c71e8ca75a72e1bb28ad4ad91d33f798ddc
tree33c3b2dd0351984693864a9a494abf9f4fed58fe
parent2d61a1e5e8dcec05ef22ae6d50c14e1109214b78
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.

(cherry picked from commit ef00eb90e56dfac2d823582cec92abf1fa9905f1)
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