summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs-xml/manpages-3/vfs_full_audit.8.xml7
-rw-r--r--examples/VFS/skel_opaque.c49
-rw-r--r--examples/VFS/skel_transparent.c42
-rw-r--r--source3/include/includes.h12
-rw-r--r--source3/include/proto.h14
-rw-r--r--source3/include/vfs.h32
-rw-r--r--source3/include/vfs_macros.h35
-rw-r--r--source3/lib/system.c148
-rw-r--r--source3/modules/vfs_default.c70
-rw-r--r--source3/modules/vfs_full_audit.c98
-rw-r--r--source3/modules/vfs_time_audit.c148
-rw-r--r--source3/smbd/aio.c76
-rw-r--r--source3/smbd/proto.h3
-rw-r--r--source3/smbd/vfs.c54
14 files changed, 0 insertions, 788 deletions
diff --git a/docs-xml/manpages-3/vfs_full_audit.8.xml b/docs-xml/manpages-3/vfs_full_audit.8.xml
index 8dbceb967d..0f0d96d1fb 100644
--- a/docs-xml/manpages-3/vfs_full_audit.8.xml
+++ b/docs-xml/manpages-3/vfs_full_audit.8.xml
@@ -38,13 +38,6 @@
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>
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index cf262b661a..56fae8435b 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -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 */
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 819f7b9c08..86a26090e3 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -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 */
diff --git a/source3/include/includes.h b/source3/include/includes.h
index cfd4d9aa52..2a117cf227 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -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,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d4be239120..f551c25590 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 1d9a2cd056..479376db37 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -451,12 +451,6 @@ enum vfs_fallocate_mode {
};
/*
- * 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).
In particular, if new operations are added to vfs_ops, appropriate constants
@@ -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,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 80b375e6e0..b88d112227 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -573,41 +573,6 @@
#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) \
diff --git a/source3/lib/system.c b/source3/lib/system.c
index fbfab3ec4f..270d0f52f4 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -35,10 +35,6 @@
#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 */
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index aa38a50b80..c9d32389c7 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -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 */
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 6d621f57ae..74cc663be8 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -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,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index a9b806a69a..16eb624ebb 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -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,
};
diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 9a980e5dda..5f9b5c0b1a 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -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
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index ffab5701a0..a78a2bf87e 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -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 */
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 0414332073..48d74cd17a 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -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)
{