From 5d09cec6fe499ac0bcc1ac98fd8aaffe7e43faa3 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 13 Jul 2012 10:22:25 +0200 Subject: s3-vfs: async fsync Signed-off-by: Jeremy Allison --- source3/include/vfs.h | 12 ++++++++++++ source3/include/vfs_macros.h | 6 ++++++ 2 files changed, 18 insertions(+) (limited to 'source3/include') diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 479376db37..c4ef5a3046 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -540,6 +540,11 @@ struct vfs_fn_pointers { const struct smb_filename *smb_fname_src, const struct smb_filename *smb_fname_dst); int (*fsync_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp); + struct tevent_req *(*fsync_send_fn)(struct vfs_handle_struct *handle, + TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct files_struct *fsp); + int (*fsync_recv_fn)(struct tevent_req *req, int *err); int (*stat_fn)(struct vfs_handle_struct *handle, struct smb_filename *smb_fname); int (*fstat_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_STAT *sbuf); int (*lstat_fn)(struct vfs_handle_struct *handle, struct smb_filename *smb_filename); @@ -923,6 +928,13 @@ int smb_vfs_call_rename(struct vfs_handle_struct *handle, const struct smb_filename *smb_fname_dst); int smb_vfs_call_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp); + +struct tevent_req *smb_vfs_call_fsync_send(struct vfs_handle_struct *handle, + TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct files_struct *fsp); +int SMB_VFS_FSYNC_RECV(struct tevent_req *req, int *perrno); + int smb_vfs_call_stat(struct vfs_handle_struct *handle, struct smb_filename *smb_fname); int smb_vfs_call_fstat(struct vfs_handle_struct *handle, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index b88d112227..515f68f16e 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -207,6 +207,12 @@ #define SMB_VFS_NEXT_FSYNC(handle, fsp) \ smb_vfs_call_fsync((handle)->next, (fsp)) +#define SMB_VFS_FSYNC_SEND(mem_ctx, ev, fsp) \ + smb_vfs_call_fsync_send((fsp)->conn->vfs_handles, (mem_ctx), (ev), \ + (fsp)) +#define SMB_VFS_NEXT_FSYNC_SEND(mem_ctx, ev, handle, fsp) \ + smb_vfs_call_fsync_send((handle)->next, (mem_ctx), (ev), (fsp)) + #define SMB_VFS_STAT(conn, smb_fname) \ smb_vfs_call_stat((conn)->vfs_handles, (smb_fname)) #define SMB_VFS_NEXT_STAT(handle, smb_fname) \ -- cgit