summaryrefslogtreecommitdiff
path: root/examples/VFS/skel_opaque.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-06-27 22:53:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:05 -0500
commitf2f55d703d0dd549a83809d3e5cc5151569b48d6 (patch)
treef5c2e7747c6541d19472a0157215c54af1b2cd62 /examples/VFS/skel_opaque.c
parent7ebd74e6c502483b7f7c73943b698d6433c8c0b2 (diff)
downloadsamba-f2f55d703d0dd549a83809d3e5cc5151569b48d6.tar.gz
samba-f2f55d703d0dd549a83809d3e5cc5151569b48d6.tar.bz2
samba-f2f55d703d0dd549a83809d3e5cc5151569b48d6.zip
r7963: Add aio support to 3.0.
Jeremy. (This used to be commit 1de27da47051af08790317f5b48b02719d6b9934)
Diffstat (limited to 'examples/VFS/skel_opaque.c')
-rw-r--r--examples/VFS/skel_opaque.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index a3a42912f8..a3aab55c3e 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -487,6 +487,41 @@ static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,in
return -1;
}
+static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return vfswrap_aio_read(NULL, fsp, aiocb);
+}
+
+static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return vfswrap_aio_write(NULL, fsp, aiocb);
+}
+
+static ssize_t skel_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return vfswrap_aio_return(NULL, fsp, aiocb);
+}
+
+static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb)
+{
+ return vfswrap_aio_cancel(NULL, fsp, fd, aiocb);
+}
+
+static int skel_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return vfswrap_aio_error(NULL, fsp, aiocb);
+}
+
+static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
+{
+ return vfswrap_aio_fsync(NULL, fsp, op, aiocb);
+}
+
+static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
+{
+ return vfswrap_aioi_suspend(NULL, fsp, aiocb, n, ts);
+}
+
/* VFS operations structure */
static vfs_op_tuple skel_op_tuples[] = {
@@ -590,6 +625,15 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_lsetxattr), SMB_VFS_OP_LSETXATTR, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_fsetxattr), SMB_VFS_OP_FSETXATTR, SMB_VFS_LAYER_OPAQUE},
+ /* AIO operations. */
+ {SMB_VFS_OP(skel_aio_read), SMB_VFS_OP_AIO_READ, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_write), SMB_VFS_OP_AIO_WRITE, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_return), SMB_VFS_OP_AIO_RETURN, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_cancel), SMB_VFS_OP_AIO_CANCEL, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_error), SMB_VFS_OP_AIO_ERROR, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_fsync), SMB_VFS_OP_AIO_FSYNC, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_suspend), SMB_VFS_OP_AIO_SUSPEND, SMB_VFS_LAYER_OPAQUE},
+
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};