From 9dc78c90f3c952f5c01686da6601c47565016290 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 9 Jul 2012 21:33:57 +0200 Subject: s3-aio: Remove unused VFS functions and more Signed-off-by: Jeremy Allison --- source3/smbd/aio.c | 76 ---------------------------------------------------- source3/smbd/proto.h | 3 --- source3/smbd/vfs.c | 54 ------------------------------------- 3 files changed, 133 deletions(-) (limited to 'source3/smbd') 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) { -- cgit