summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-06-26 14:30:59 +0200
committerJeremy Allison <jra@samba.org>2012-07-18 13:49:21 -0700
commitc6e456d9c08eb0d05904802e0f23f15676a13e0d (patch)
tree6066546f482f0dc83285fb5aec0639d4d98d5053 /source3/include
parentd44ccdd4378d6aafd1dd6322e419d1165635f25b (diff)
downloadsamba-c6e456d9c08eb0d05904802e0f23f15676a13e0d.tar.gz
samba-c6e456d9c08eb0d05904802e0f23f15676a13e0d.tar.bz2
samba-c6e456d9c08eb0d05904802e0f23f15676a13e0d.zip
s3-vfs: async pwrite
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/vfs.h15
-rw-r--r--source3/include/vfs_macros.h7
2 files changed, 22 insertions, 0 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 6508707f75..2a466de0b4 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -517,6 +517,13 @@ struct vfs_fn_pointers {
ssize_t (*pread_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, void *data, size_t n, off_t offset);
ssize_t (*write_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n);
ssize_t (*pwrite_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const void *data, size_t n, off_t offset);
+ struct tevent_req *(*pwrite_send_fn)(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct files_struct *fsp,
+ const void *data,
+ size_t n, off_t offset);
+ ssize_t (*pwrite_recv_fn)(struct tevent_req *req, int *err);
off_t (*lseek_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, off_t offset, int whence);
ssize_t (*sendfile_fn)(struct vfs_handle_struct *handle, int tofd, files_struct *fromfsp, const DATA_BLOB *header, off_t offset, size_t count);
ssize_t (*recvfile_fn)(struct vfs_handle_struct *handle, int fromfd, files_struct *tofsp, off_t offset, size_t count);
@@ -884,6 +891,14 @@ ssize_t smb_vfs_call_write(struct vfs_handle_struct *handle,
ssize_t smb_vfs_call_pwrite(struct vfs_handle_struct *handle,
struct files_struct *fsp, const void *data,
size_t n, off_t offset);
+struct tevent_req *smb_vfs_call_pwrite_send(struct vfs_handle_struct *handle,
+ TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct files_struct *fsp,
+ const void *data,
+ size_t n, off_t offset);
+ssize_t SMB_VFS_PWRITE_RECV(struct tevent_req *req, int *perrno);
+
off_t smb_vfs_call_lseek(struct vfs_handle_struct *handle,
struct files_struct *fsp, off_t offset,
int whence);
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 3c2256bfee..24add0b926 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -168,6 +168,13 @@
#define SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, off) \
smb_vfs_call_pwrite((handle)->next, (fsp), (data), (n), (off))
+#define SMB_VFS_PWRITE_SEND(mem_ctx, ev, fsp, data, n, off) \
+ smb_vfs_call_pwrite_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \
+ (fsp), (data), (n), (off))
+#define SMB_VFS_NEXT_PWRITE_SEND(mem_ctx, ev, handle, fsp, data, n, off) \
+ smb_vfs_call_pwrite_send((handle)->next, (mem_ctx), (ev), (fsp), \
+ (data), (n), (off))
+
#define SMB_VFS_LSEEK(fsp, offset, whence) \
smb_vfs_call_lseek((fsp)->conn->vfs_handles, (fsp), (offset), (whence))
#define SMB_VFS_NEXT_LSEEK(handle, fsp, offset, whence) \