diff options
author | Jeremy Allison <jra@samba.org> | 2007-10-29 17:16:13 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2007-10-29 17:16:13 -0700 |
commit | 488b59cfac244ec8cfc60df687fcd153d693509c (patch) | |
tree | 016f3ce43e8a7b6b4a0bab95ebfd69854cf0182b /source3/modules/vfs_default.c | |
parent | 32dd016353355acfb71dd773187076f95ff6e86e (diff) | |
download | samba-488b59cfac244ec8cfc60df687fcd153d693509c.tar.gz samba-488b59cfac244ec8cfc60df687fcd153d693509c.tar.bz2 samba-488b59cfac244ec8cfc60df687fcd153d693509c.zip |
Add in the recvfile entry to the VFS layer with a default
implementation. Needed for the zero-copy write code.
Jeremy.
(This used to be commit bfbdb6324c5d13bfde8b742e9c5a0e0c9092bd86)
Diffstat (limited to 'source3/modules/vfs_default.c')
-rw-r--r-- | source3/modules/vfs_default.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index a3bb61d419..8c2bbfea96 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -348,6 +348,21 @@ static ssize_t vfswrap_sendfile(vfs_handle_struct *handle, int tofd, files_struc return result; } +static ssize_t vfswrap_recvfile(vfs_handle_struct *handle, + int fromfd, + files_struct *fsp, + int tofd, + SMB_OFF_T offset, + size_t n) +{ + ssize_t result; + + START_PROFILE_BYTES(syscall_recvfile, n); + result = sys_recvfile(fromfd, tofd, offset, n); + END_PROFILE(syscall_recvfile); + return result; +} + /********************************************************* For rename across filesystems Patch from Warren Birnbaum <warrenb@hpcvscdp.cv.hp.com> @@ -1263,6 +1278,8 @@ static vfs_op_tuple vfs_default_ops[] = { SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_sendfile), SMB_VFS_OP_SENDFILE, SMB_VFS_LAYER_OPAQUE}, + {SMB_VFS_OP(vfswrap_recvfile), SMB_VFS_OP_RECVFILE, + SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_fsync), SMB_VFS_OP_FSYNC, |