s3-aio: Remove unused VFS functions and more
authorVolker Lendecke <vl@samba.org>
Mon, 9 Jul 2012 19:33:57 +0000 (21:33 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 18 Jul 2012 22:45:58 +0000 (15:45 -0700)
Signed-off-by: Jeremy Allison <jra@samba.org>
14 files changed:
docs-xml/manpages-3/vfs_full_audit.8.xml
examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/includes.h
source3/include/proto.h
source3/include/vfs.h
source3/include/vfs_macros.h
source3/lib/system.c
source3/modules/vfs_default.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_time_audit.c
source3/smbd/aio.c
source3/smbd/proto.h
source3/smbd/vfs.c

index 8dbceb967d168a10f8390117eff2087ba352a748..0f0d96d1fb5f54efb320917bdc4de4967ad49c9c 100644 (file)
        complete set of Samba VFS operations:</para>
 
        <simplelist>
-        <member>aio_cancel</member>
-        <member>aio_error</member>
-        <member>aio_fsync</member>
-        <member>aio_read</member>
-        <member>aio_return</member>
-        <member>aio_suspend</member>
-        <member>aio_write</member>
         <member>chdir</member>
         <member>chflags</member>
         <member>chmod</member>
index cf262b661a23d01a6df810d47e4da53caf80b060..56fae8435b2423aecc47d70e4a955fbf6e26df80 100644 (file)
@@ -741,48 +741,6 @@ static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, c
        return -1;
 }
 
-static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-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)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
 static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
 {
        errno = ENOSYS;
@@ -931,13 +889,6 @@ struct vfs_fn_pointers skel_opaque_fns = {
        .fsetxattr_fn = skel_fsetxattr,
 
        /* aio operations */
-       .aio_read_fn = skel_aio_read,
-       .aio_write_fn = skel_aio_write,
-       .aio_return_fn = skel_aio_return_fn,
-       .aio_cancel_fn = skel_aio_cancel,
-       .aio_error_fn = skel_aio_error_fn,
-       .aio_fsync_fn = skel_aio_fsync,
-       .aio_suspend_fn = skel_aio_suspend,
        .aio_force_fn = skel_aio_force,
 
        /* offline operations */
index 819f7b9c085c33ae4ae6dfe32b9e842c42471068..86a26090e39e9e0ff8fed9960111f4655100ba40 100644 (file)
@@ -788,41 +788,6 @@ static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp, c
         return SMB_VFS_NEXT_FSETXATTR(handle, fsp, name, value, size, flags);
 }
 
-static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
-}
-
-static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
-}
-
-static ssize_t skel_aio_return_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
-}
-
-static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
-}
-
-static int skel_aio_error_fn(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
-}
-
-static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
-{
-       return SMB_VFS_NEXT_AIO_FSYNC(handle, 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 SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
-}
-
 static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
 {
         return SMB_VFS_NEXT_AIO_FORCE(handle, fsp);
@@ -968,13 +933,6 @@ struct vfs_fn_pointers skel_transparent_fns = {
        .fsetxattr_fn = skel_fsetxattr,
 
        /* aio operations */
-       .aio_read_fn = skel_aio_read,
-       .aio_write_fn = skel_aio_write,
-       .aio_return_fn = skel_aio_return_fn,
-       .aio_cancel_fn = skel_aio_cancel,
-       .aio_error_fn = skel_aio_error_fn,
-       .aio_fsync_fn = skel_aio_fsync,
-       .aio_suspend_fn = skel_aio_suspend,
        .aio_force_fn = skel_aio_force,
 
        /* offline operations */
index cfd4d9aa52553b42d8c4b804db028a9e2c261075..2a117cf227f03f664f9e25f52b23eb46574174af 100644 (file)
@@ -334,18 +334,6 @@ struct stat_ex {
 
 typedef struct stat_ex SMB_STRUCT_STAT;
 
-/*
- * Type for aiocb structure.
- */
-
-#ifndef SMB_STRUCT_AIOCB
-#  if defined(HAVE_AIO)
-#      define SMB_STRUCT_AIOCB struct aiocb
-#  else
-#    define SMB_STRUCT_AIOCB int /* AIO not being used but we still need the define.... */
-#  endif
-#endif
-
 enum timestamp_set_resolution {
        TIMESTAMP_SET_SECONDS = 0,
        TIMESTAMP_SET_MSEC,
index d4be239120886f1025437c9f30318f64bd06a787..f551c255904be39cf6bceeca0b3d78f9a552ea57 100644 (file)
@@ -310,20 +310,6 @@ uint32 unix_dev_minor(SMB_DEV_T dev);
 #if 0
 int sys_get_number_of_cores(void);
 #endif
-int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
-ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
-int sys_aio_read(SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_write(SMB_STRUCT_AIOCB *aiocb);
-ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb);
-int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout);
 
 struct stat;
 void init_stat_ex_from_stat (struct stat_ex *dst,
index 1d9a2cd0563a363ff8b98f39580a91a1e1563ea0..479376db37348e27b623f2b27c127e90579b6a2c 100644 (file)
@@ -450,12 +450,6 @@ enum vfs_fallocate_mode {
        VFS_FALLOCATE_KEEP_SIZE = 1
 };
 
-/*
- * forward declaration required here until the posix aio functions
- * leave the VFS
- */
-struct aiocb;
-
 /*
     Available VFS operations. These values must be in sync with vfs_ops struct
     (struct vfs_fn_pointers and struct vfs_handle_pointers inside of struct vfs_ops).
@@ -709,13 +703,6 @@ struct vfs_fn_pointers {
        int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags);
 
        /* aio operations */
-       int (*aio_read_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-       int (*aio_write_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-       ssize_t (*aio_return_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-       int (*aio_cancel_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-       int (*aio_error_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-       int (*aio_fsync_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
-       int (*aio_suspend_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout);
        bool (*aio_force_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp);
 
        /* offline operations */
@@ -1147,25 +1134,6 @@ int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path,
 int smb_vfs_call_fsetxattr(struct vfs_handle_struct *handle,
                           struct files_struct *fsp, const char *name,
                           const void *value, size_t size, int flags);
-int smb_vfs_call_aio_read(struct vfs_handle_struct *handle,
-                         struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-int smb_vfs_call_aio_write(struct vfs_handle_struct *handle,
-                          struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-ssize_t smb_vfs_call_aio_return(struct vfs_handle_struct *handle,
-                               struct files_struct *fsp,
-                               SMB_STRUCT_AIOCB *aiocb);
-int smb_vfs_call_aio_cancel(struct vfs_handle_struct *handle,
-                           struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
-int smb_vfs_call_aio_error(struct vfs_handle_struct *handle,
-                          struct files_struct *fsp,
-                          SMB_STRUCT_AIOCB *aiocb);
-int smb_vfs_call_aio_fsync(struct vfs_handle_struct *handle,
-                          struct files_struct *fsp, int op,
-                          SMB_STRUCT_AIOCB *aiocb);
-int smb_vfs_call_aio_suspend(struct vfs_handle_struct *handle,
-                            struct files_struct *fsp,
-                            const SMB_STRUCT_AIOCB * const aiocb[], int n,
-                            const struct timespec *timeout);
 bool smb_vfs_call_aio_force(struct vfs_handle_struct *handle,
                            struct files_struct *fsp);
 bool smb_vfs_call_is_offline(struct vfs_handle_struct *handle,
index 80b375e6e0f74f8a56d0423062a812c210e1282e..b88d11222787eea2e8c65c9e59231780dd758b50 100644 (file)
 #define SMB_VFS_NEXT_FSETXATTR(handle,fsp,name,value,size,flags) \
        smb_vfs_call_fsetxattr((handle)->next,(fsp),(name),(value),(size),(flags))
 
-#define SMB_VFS_AIO_READ(fsp,aiocb) \
-       smb_vfs_call_aio_read((fsp)->conn->vfs_handles, (fsp), (aiocb))
-#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb) \
-       smb_vfs_call_aio_read((handle)->next,(fsp),(aiocb))
-
-#define SMB_VFS_AIO_WRITE(fsp,aiocb) \
-       smb_vfs_call_aio_write((fsp)->conn->vfs_handles, (fsp), (aiocb))
-#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb) \
-       smb_vfs_call_aio_write((handle)->next,(fsp),(aiocb))
-
-#define SMB_VFS_AIO_RETURN(fsp,aiocb) \
-       smb_vfs_call_aio_return((fsp)->conn->vfs_handles, (fsp), (aiocb))
-#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb) \
-       smb_vfs_call_aio_return((handle)->next,(fsp),(aiocb))
-
-#define SMB_VFS_AIO_CANCEL(fsp,aiocb) \
-       smb_vfs_call_aio_cancel((fsp)->conn->vfs_handles, (fsp), (aiocb))
-#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,aiocb) \
-       smb_vfs_call_aio_cancel((handle)->next,(fsp),(aiocb))
-
-#define SMB_VFS_AIO_ERROR(fsp,aiocb) \
-       smb_vfs_call_aio_error((fsp)->conn->vfs_handles, (fsp),(aiocb))
-#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb) \
-       smb_vfs_call_aio_error((handle)->next,(fsp),(aiocb))
-
-#define SMB_VFS_AIO_FSYNC(fsp,op,aiocb) \
-       smb_vfs_call_aio_fsync((fsp)->conn->vfs_handles, (fsp), (op),(aiocb))
-#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb) \
-       smb_vfs_call_aio_fsync((handle)->next,(fsp),(op),(aiocb))
-
-#define SMB_VFS_AIO_SUSPEND(fsp,aiocb,n,ts) \
-       smb_vfs_call_aio_suspend((fsp)->conn->vfs_handles, (fsp),(aiocb),(n),(ts))
-#define SMB_VFS_NEXT_AIO_SUSPEND(handle,fsp,aiocb,n,ts) \
-       smb_vfs_call_aio_suspend((handle)->next,(fsp),(aiocb),(n),(ts))
-
 #define SMB_VFS_AIO_FORCE(fsp) \
        smb_vfs_call_aio_force((fsp)->conn->vfs_handles, (fsp))
 #define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) \
index fbfab3ec4fbcfe1916bd04045406ced8b431073c..270d0f52f4b98d0dd6971da0a7ba6facd8c8b2a0 100644 (file)
 #include <sys/prctl.h>
 #endif
 
-#if defined(HAVE_AIO_H)
-#include <aio.h>
-#endif
-
 /*
    The idea is that this file will eventually have wrappers around all
    important system calls in samba. The aims are:
@@ -1383,147 +1379,3 @@ int sys_get_number_of_cores(void)
        return ret;
 }
 #endif
-
-#if defined(HAVE_AIO)
-
-/*******************************************************************
- An aio_read wrapper.
-********************************************************************/
-
-int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_READ)
-        return aio_read(aiocb);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_write wrapper.
-********************************************************************/
-
-int sys_aio_write(SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_WRITE)
-        return aio_write(aiocb);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_return wrapper.
-********************************************************************/
-
-ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_RETURN)
-        return aio_return(aiocb);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_cancel wrapper.
-********************************************************************/
-
-int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_CANCEL)
-        return aio_cancel(fd, aiocb);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_error wrapper.
-********************************************************************/
-
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_ERROR)
-        return aio_error(aiocb);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_fsync wrapper.
-********************************************************************/
-
-int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb)
-{
-#if defined(HAVE_AIO_FSYNC)
-        return aio_fsync(op, aiocb);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-
-/*******************************************************************
- An aio_fsync wrapper.
-********************************************************************/
-
-int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout)
-{
-#if defined(HAVE_AIO_FSYNC)
-        return aio_suspend(cblist, n, timeout);
-#else
-       errno = ENOSYS;
-       return -1;
-#endif
-}
-#else /* !HAVE_AIO */
-
-int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-int sys_aio_write(SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-int sys_aio_cancel(int fd, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-int sys_aio_fsync(int op, SMB_STRUCT_AIOCB *aiocb)
-{
-       errno = ENOSYS;
-       return -1;
-}
-
-int sys_aio_suspend(const SMB_STRUCT_AIOCB * const cblist[], int n, const struct timespec *timeout)
-{
-       errno = ENOSYS;
-       return -1;
-}
-#endif /* HAVE_AIO */
index aa38a50b8098bb5e6dd7bd90a8204ae32effda76..c9d32389c77f1c8fbafffde83fd5a793ce428328 100644 (file)
@@ -2155,69 +2155,6 @@ static int vfswrap_fsetxattr(struct vfs_handle_struct *handle, struct files_stru
        return fsetxattr(fsp->fh->fd, name, value, size, flags);
 }
 
-static int vfswrap_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int ret;
-       if (!initialize_async_io_handler()) {
-               errno = ENOSYS;
-               return -1;
-       }
-       /*
-        * aio_read must be done as root, because in the glibc aio
-        * implementation the helper thread needs to be able to send a signal
-        * to the main thread, even when it has done a seteuid() to a
-        * different user.
-        */
-       become_root();
-       ret = sys_aio_read(aiocb);
-       unbecome_root();
-       return ret;
-}
-
-static int vfswrap_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int ret;
-       if (!initialize_async_io_handler()) {
-               errno = ENOSYS;
-               return -1;
-       }
-       /*
-        * aio_write must be done as root, because in the glibc aio
-        * implementation the helper thread needs to be able to send a signal
-        * to the main thread, even when it has done a seteuid() to a
-        * different user.
-        */
-       become_root();
-       ret = sys_aio_write(aiocb);
-       unbecome_root();
-       return ret;
-}
-
-static ssize_t vfswrap_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return sys_aio_return(aiocb);
-}
-
-static int vfswrap_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return sys_aio_cancel(fsp->fh->fd, aiocb);
-}
-
-static int vfswrap_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       return sys_aio_error(aiocb);
-}
-
-static int vfswrap_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
-{
-       return sys_aio_fsync(op, aiocb);
-}
-
-static int vfswrap_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *timeout)
-{
-       return sys_aio_suspend(aiocb, n, timeout);
-}
-
 static bool vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
 {
        return false;
@@ -2393,13 +2330,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
        .fsetxattr_fn = vfswrap_fsetxattr,
 
        /* aio operations */
-       .aio_read_fn = vfswrap_aio_read,
-       .aio_write_fn = vfswrap_aio_write,
-       .aio_return_fn = vfswrap_aio_return,
-       .aio_cancel_fn = vfswrap_aio_cancel,
-       .aio_error_fn = vfswrap_aio_error,
-       .aio_fsync_fn = vfswrap_aio_fsync,
-       .aio_suspend_fn = vfswrap_aio_suspend,
        .aio_force_fn = vfswrap_aio_force,
 
        /* offline operations */
index 6d621f57ae94ad70dba15a0c2e683e4cb024764f..74cc663be83cd667743d97682b2975a2a6ee9853 100644 (file)
@@ -205,13 +205,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_FSETXATTR,
 
        /* aio operations */
-       SMB_VFS_OP_AIO_READ,
-       SMB_VFS_OP_AIO_WRITE,
-       SMB_VFS_OP_AIO_RETURN,
-       SMB_VFS_OP_AIO_CANCEL,
-       SMB_VFS_OP_AIO_ERROR,
-       SMB_VFS_OP_AIO_FSYNC,
-       SMB_VFS_OP_AIO_SUSPEND,
         SMB_VFS_OP_AIO_FORCE,
 
        /* offline operations */
@@ -332,13 +325,6 @@ static struct {
        { SMB_VFS_OP_FREMOVEXATTR,      "fremovexattr" },
        { SMB_VFS_OP_SETXATTR,  "setxattr" },
        { SMB_VFS_OP_FSETXATTR, "fsetxattr" },
-       { SMB_VFS_OP_AIO_READ,  "aio_read" },
-       { SMB_VFS_OP_AIO_WRITE, "aio_write" },
-       { SMB_VFS_OP_AIO_RETURN,"aio_return" },
-       { SMB_VFS_OP_AIO_CANCEL,"aio_cancel" },
-       { SMB_VFS_OP_AIO_ERROR, "aio_error" },
-       { SMB_VFS_OP_AIO_FSYNC, "aio_fsync" },
-       { SMB_VFS_OP_AIO_SUSPEND,"aio_suspend" },
        { SMB_VFS_OP_AIO_FORCE, "aio_force" },
        { SMB_VFS_OP_IS_OFFLINE, "is_offline" },
        { SMB_VFS_OP_SET_OFFLINE, "set_offline" },
@@ -2212,83 +2198,6 @@ static int smb_full_audit_fsetxattr(struct vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_full_audit_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
-       do_log(SMB_VFS_OP_AIO_READ, (result >= 0), handle,
-              "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
-static int smb_full_audit_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
-       do_log(SMB_VFS_OP_AIO_WRITE, (result >= 0), handle,
-              "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
-static ssize_t smb_full_audit_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
-       do_log(SMB_VFS_OP_AIO_RETURN, (result >= 0), handle,
-              "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
-static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
-       do_log(SMB_VFS_OP_AIO_CANCEL, (result >= 0), handle,
-              "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
-static int smb_full_audit_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
-       do_log(SMB_VFS_OP_AIO_ERROR, (result >= 0), handle,
-              "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
-static int smb_full_audit_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
-       do_log(SMB_VFS_OP_AIO_FSYNC, (result >= 0), handle,
-               "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
-static int smb_full_audit_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
-{
-       int result;
-
-       result = SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
-       do_log(SMB_VFS_OP_AIO_SUSPEND, (result >= 0), handle,
-               "%s", fsp_str_do_log(fsp));
-
-       return result;
-}
-
 static bool smb_full_audit_aio_force(struct vfs_handle_struct *handle,
                                     struct files_struct *fsp)
 {
@@ -2433,13 +2342,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .fremovexattr_fn = smb_full_audit_fremovexattr,
        .setxattr_fn = smb_full_audit_setxattr,
        .fsetxattr_fn = smb_full_audit_fsetxattr,
-       .aio_read_fn = smb_full_audit_aio_read,
-       .aio_write_fn = smb_full_audit_aio_write,
-       .aio_return_fn = smb_full_audit_aio_return,
-       .aio_cancel_fn = smb_full_audit_aio_cancel,
-       .aio_error_fn = smb_full_audit_aio_error,
-       .aio_fsync_fn = smb_full_audit_aio_fsync,
-       .aio_suspend_fn = smb_full_audit_aio_suspend,
        .aio_force_fn = smb_full_audit_aio_force,
        .is_offline_fn = smb_full_audit_is_offline,
        .set_offline_fn = smb_full_audit_set_offline,
index a9b806a69a50617aeea8a41df4af5b12463103e9..16eb624ebb7a5c9362094a33e01d800794508cb1 100644 (file)
@@ -2225,147 +2225,6 @@ static int smb_time_audit_fsetxattr(struct vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_time_audit_aio_read(struct vfs_handle_struct *handle,
-                                  struct files_struct *fsp,
-                                  SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_read", timediff);
-       }
-
-       return result;
-}
-
-static int smb_time_audit_aio_write(struct vfs_handle_struct *handle,
-                                   struct files_struct *fsp,
-                                   SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_write", timediff);
-       }
-
-       return result;
-}
-
-static ssize_t smb_time_audit_aio_return(struct vfs_handle_struct *handle,
-                                        struct files_struct *fsp,
-                                        SMB_STRUCT_AIOCB *aiocb)
-{
-       ssize_t result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_return", timediff);
-       }
-
-       return result;
-}
-
-static int smb_time_audit_aio_cancel(struct vfs_handle_struct *handle,
-                                    struct files_struct *fsp,
-                                    SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, aiocb);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_cancel", timediff);
-       }
-
-       return result;
-}
-
-static int smb_time_audit_aio_error(struct vfs_handle_struct *handle,
-                                   struct files_struct *fsp,
-                                   SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_error", timediff);
-       }
-
-       return result;
-}
-
-static int smb_time_audit_aio_fsync(struct vfs_handle_struct *handle,
-                                   struct files_struct *fsp, int op,
-                                   SMB_STRUCT_AIOCB *aiocb)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_fsync", timediff);
-       }
-
-       return result;
-}
-
-static int smb_time_audit_aio_suspend(struct vfs_handle_struct *handle,
-                                     struct files_struct *fsp,
-                                     const SMB_STRUCT_AIOCB * const aiocb[],
-                                     int n, const struct timespec *ts)
-{
-       int result;
-       struct timespec ts1,ts2;
-       double timediff;
-
-       clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
-       clock_gettime_mono(&ts2);
-       timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
-       if (timediff > audit_timeout) {
-               smb_time_audit_log("aio_suspend", timediff);
-       }
-
-       return result;
-}
-
 static bool smb_time_audit_aio_force(struct vfs_handle_struct *handle,
                                     struct files_struct *fsp)
 {
@@ -2495,13 +2354,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
        .fremovexattr_fn = smb_time_audit_fremovexattr,
        .setxattr_fn = smb_time_audit_setxattr,
        .fsetxattr_fn = smb_time_audit_fsetxattr,
-       .aio_read_fn = smb_time_audit_aio_read,
-       .aio_write_fn = smb_time_audit_aio_write,
-       .aio_return_fn = smb_time_audit_aio_return,
-       .aio_cancel_fn = smb_time_audit_aio_cancel,
-       .aio_error_fn = smb_time_audit_aio_error,
-       .aio_fsync_fn = smb_time_audit_aio_fsync,
-       .aio_suspend_fn = smb_time_audit_aio_suspend,
        .aio_force_fn = smb_time_audit_aio_force,
 };
 
index 9a980e5dda0090b8e534e61647e1bd9651697f5e..5f9b5c0b1adac2ebe48728e5d61bbff6d2d02d80 100644 (file)
@@ -23,8 +23,6 @@
 #include "smbd/globals.h"
 #include "../lib/util/tevent_ntstatus.h"
 
-#if defined(HAVE_AIO)
-
 /****************************************************************************
  The buffer we keep around whilst an aio request is in process.
 *****************************************************************************/
@@ -48,11 +46,6 @@ bool aio_write_through_requested(struct aio_extra *aio_ex)
        return aio_ex->write_through;
 }
 
-bool initialize_async_io_handler(void)
-{
-       return true;
-}
-
 static int aio_extra_destructor(struct aio_extra *aio_ex)
 {
        outstanding_aio_calls--;
@@ -891,11 +884,6 @@ static void aio_pwrite_smb2_done(struct tevent_req *req)
  Handle any aio completion inline.
 *****************************************************************************/
 
-void smbd_aio_complete_aio_ex(struct aio_extra *aio_ex)
-{
-       return;
-}
-
 void aio_fsp_close(files_struct *fsp)
 {
        unsigned i;
@@ -907,67 +895,3 @@ void aio_fsp_close(files_struct *fsp)
                aio_ex->fsp = NULL;
        }
 }
-
-#else
-
-bool initialize_async_io_handler(void)
-{
-       return false;
-}
-
-NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
-                            struct smb_request *smbreq,
-                            files_struct *fsp, off_t startpos,
-                            size_t smb_maxcnt)
-{
-       return NT_STATUS_RETRY;
-}
-
-NTSTATUS schedule_aio_write_and_X(connection_struct *conn,
-                             struct smb_request *smbreq,
-                             files_struct *fsp, const char *data,
-                             off_t startpos,
-                             size_t numtowrite)
-{
-       return NT_STATUS_RETRY;
-}
-
-bool cancel_smb2_aio(struct smb_request *smbreq)
-{
-       return false;
-}
-
-NTSTATUS schedule_smb2_aio_read(connection_struct *conn,
-                                struct smb_request *smbreq,
-                                files_struct *fsp,
-                               TALLOC_CTX *ctx,
-                               DATA_BLOB *preadbuf,
-                                off_t startpos,
-                                size_t smb_maxcnt)
-{
-       return NT_STATUS_RETRY;
-}
-
-NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
-                               struct smb_request *smbreq,
-                               files_struct *fsp,
-                               uint64_t in_offset,
-                               DATA_BLOB in_data,
-                               bool write_through)
-{
-       return NT_STATUS_RETRY;
-}
-
-void aio_fsp_close(files_struct *fsp)
-{
-       return;
-}
-
-int wait_for_aio_completion(files_struct *fsp)
-{
-       return 0;
-}
-
-void smbd_aio_complete_mid(uint64_t mid);
-
-#endif
index ffab5701a098bc856bbdf29c6e98187e6ffd42ce..a78a2bf87e1c38beff8abdee6718d75d7294dcc6 100644 (file)
@@ -65,7 +65,6 @@ void srv_set_signing(struct smbd_server_connection *conn,
 /* The following definitions come from smbd/aio.c  */
 
 bool aio_write_through_requested(struct aio_extra *aio_ex);
-bool initialize_async_io_handler(void);
 NTSTATUS schedule_aio_read_and_X(connection_struct *conn,
                             struct smb_request *req,
                             files_struct *fsp, off_t startpos,
@@ -90,8 +89,6 @@ NTSTATUS schedule_aio_smb2_write(connection_struct *conn,
                                bool write_through);
 bool cancel_smb2_aio(struct smb_request *smbreq);
 void aio_fsp_close(files_struct *fsp);
-int wait_for_aio_completion(files_struct *fsp);
-void smbd_aio_complete_aio_ex(struct aio_extra *aio_ex);
 
 /* The following definitions come from smbd/blocking.c  */
 
index 0414332073fd2641d6c546d66631f66f26ca4c5a..48d74cd17a6bb26a92d6794ccb2543af9ee9f97f 100644 (file)
@@ -2369,60 +2369,6 @@ int smb_vfs_call_fsetxattr(struct vfs_handle_struct *handle,
        return handle->fns->fsetxattr_fn(handle, fsp, name, value, size, flags);
 }
 
-int smb_vfs_call_aio_read(struct vfs_handle_struct *handle,
-                         struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       VFS_FIND(aio_read);
-       return handle->fns->aio_read_fn(handle, fsp, aiocb);
-}
-
-int smb_vfs_call_aio_write(struct vfs_handle_struct *handle,
-                          struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       VFS_FIND(aio_write);
-       return handle->fns->aio_write_fn(handle, fsp, aiocb);
-}
-
-ssize_t smb_vfs_call_aio_return(struct vfs_handle_struct *handle,
-                               struct files_struct *fsp,
-                               SMB_STRUCT_AIOCB *aiocb)
-{
-       VFS_FIND(aio_return);
-       return handle->fns->aio_return_fn(handle, fsp, aiocb);
-}
-
-int smb_vfs_call_aio_cancel(struct vfs_handle_struct *handle,
-                           struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
-{
-       VFS_FIND(aio_cancel);
-       return handle->fns->aio_cancel_fn(handle, fsp, aiocb);
-}
-
-int smb_vfs_call_aio_error(struct vfs_handle_struct *handle,
-                          struct files_struct *fsp,
-                          SMB_STRUCT_AIOCB *aiocb)
-{
-       VFS_FIND(aio_error);
-       return handle->fns->aio_error_fn(handle, fsp, aiocb);
-}
-
-int smb_vfs_call_aio_fsync(struct vfs_handle_struct *handle,
-                          struct files_struct *fsp, int op,
-                          SMB_STRUCT_AIOCB *aiocb)
-{
-       VFS_FIND(aio_fsync);
-       return handle->fns->aio_fsync_fn(handle, fsp, op, aiocb);
-}
-
-int smb_vfs_call_aio_suspend(struct vfs_handle_struct *handle,
-                            struct files_struct *fsp,
-                            const SMB_STRUCT_AIOCB * const aiocb[], int n,
-                            const struct timespec *timeout)
-{
-       VFS_FIND(aio_suspend);
-       return handle->fns->aio_suspend_fn(handle, fsp, aiocb, n, timeout);
-}
-
 bool smb_vfs_call_aio_force(struct vfs_handle_struct *handle,
                            struct files_struct *fsp)
 {