summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-07-13 10:22:25 +0200
committerJeremy Allison <jra@samba.org>2012-07-18 15:48:04 -0700
commit5d09cec6fe499ac0bcc1ac98fd8aaffe7e43faa3 (patch)
treeb1438456ff31f7e522089f6569f67c078d6eadc4 /source3/include
parent3882113e6f44d0adbc321d97931a6e9a37a149b8 (diff)
downloadsamba-5d09cec6fe499ac0bcc1ac98fd8aaffe7e43faa3.tar.gz
samba-5d09cec6fe499ac0bcc1ac98fd8aaffe7e43faa3.tar.bz2
samba-5d09cec6fe499ac0bcc1ac98fd8aaffe7e43faa3.zip
s3-vfs: async fsync
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/vfs.h12
-rw-r--r--source3/include/vfs_macros.h6
2 files changed, 18 insertions, 0 deletions
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) \