AIX and aio
Jim McDonough
jmcd at us.ibm.com
Thu Aug 4 19:55:56 GMT 2005
I suppose I should have sent this patch along before...
Index: smbd/vfs.c
===================================================================
--- smbd/vfs.c (revision 9068)
+++ smbd/vfs.c (working copy)
@@ -152,7 +152,7 @@
vfswrap_aio_write,
vfswrap_aio_return,
vfswrap_aio_cancel,
- vfswrap_aio_error,
+ vfswrap_aio_error_fn,
vfswrap_aio_fsync,
vfswrap_aio_suspend
}
Index: smbd/vfs-wrap.c
===================================================================
--- smbd/vfs-wrap.c (revision 9068)
+++ smbd/vfs-wrap.c (working copy)
@@ -1073,9 +1073,9 @@
return sys_aio_cancel(fd, aiocb);
}
-int vfswrap_aio_error(struct vfs_handle_struct *handle, struct
files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+int vfswrap_aio_error_fn(struct vfs_handle_struct *handle, struct
files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
- return sys_aio_error(aiocb);
+ return sys_aio_error_fn(aiocb);
}
int vfswrap_aio_fsync(struct vfs_handle_struct *handle, struct
files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
Index: lib/system.c
===================================================================
--- lib/system.c (revision 9068)
+++ lib/system.c (working copy)
@@ -1917,7 +1917,7 @@
An aio_error wrapper that will deal with 64-bit sizes.
********************************************************************/
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb)
+int sys_aio_error_fn(const SMB_STRUCT_AIOCB *aiocb)
{
#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) &&
defined(HAVE_AIO_ERROR64)
return aio_error64(aiocb);
@@ -1986,7 +1986,7 @@
return -1;
}
-int sys_aio_error(const SMB_STRUCT_AIOCB *aiocb)
+int sys_aio_error_fn(const SMB_STRUCT_AIOCB *aiocb)
{
errno = ENOSYS;
return -1;
Index: modules/vfs_full_audit.c
===================================================================
--- modules/vfs_full_audit.c (revision 9068)
+++ modules/vfs_full_audit.c (working copy)
@@ -295,7 +295,7 @@
static int smb_full_audit_aio_write(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static ssize_t smb_full_audit_aio_return(struct vfs_handle_struct
*handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static int smb_full_audit_aio_cancel(struct vfs_handle_struct *handle,
struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb);
-static int smb_full_audit_aio_error(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
+static int smb_full_audit_aio_error_fn(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
static int smb_full_audit_aio_fsync(struct vfs_handle_struct *handle,
struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
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);
@@ -493,7 +493,7 @@
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_aio_cancel), SMB_VFS_OP_AIO_CANCEL,
SMB_VFS_LAYER_LOGGER},
- {SMB_VFS_OP(smb_full_audit_aio_error), SMB_VFS_OP_AIO_ERROR,
+ {SMB_VFS_OP(smb_full_audit_aio_error_fn), SMB_VFS_OP_AIO_ERROR,
SMB_VFS_LAYER_LOGGER},
{SMB_VFS_OP(smb_full_audit_aio_fsync), SMB_VFS_OP_AIO_FSYNC,
SMB_VFS_LAYER_LOGGER},
@@ -1909,7 +1909,7 @@
return result;
}
-static int smb_full_audit_aio_error(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+static int smb_full_audit_aio_error_fn(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
{
int result;
Index: include/vfs_macros.h
===================================================================
--- include/vfs_macros.h (revision 9068)
+++ include/vfs_macros.h (working copy)
@@ -127,7 +127,7 @@
#define SMB_VFS_AIO_WRITE(fsp,aiocb)
((fsp)->conn->vfs.ops.aio_write((fsp)->conn->vfs.handles.aio_write,(fsp),(aiocb)))
#define SMB_VFS_AIO_RETURN(fsp,aiocb)
((fsp)->conn->vfs.ops.aio_return((fsp)->conn->vfs.handles.aio_return,(fsp),(aiocb)))
#define SMB_VFS_AIO_CANCEL(fsp,fd,aiocb)
((fsp)->conn->vfs.ops.aio_cancel((fsp)->conn->vfs.handles.aio_cancel,(fsp),(fd),(aiocb)))
-#define SMB_VFS_AIO_ERROR(fsp,aiocb)
((fsp)->conn->vfs.ops.aio_error((fsp)->conn->vfs.handles.aio_error,(fsp),(aiocb)))
+#define SMB_VFS_AIO_ERROR(fsp,aiocb)
((fsp)->conn->vfs.ops.aio_error_fn((fsp)->conn->vfs.handles.aio_error,(fsp),(aiocb)))
#define SMB_VFS_AIO_FSYNC(fsp,op,aiocb)
((fsp)->conn->vfs.ops.aio_fsync((fsp)->conn->vfs.handles.aio_fsync,(fsp),(op),(aiocb)))
#define SMB_VFS_AIO_SUSPEND(fsp,aiocb,n,ts)
((fsp)->conn->vfs.ops.aio_suspend((fsp)->conn->vfs.handles.aio_suspend,(fsp),(aiocb),(n),(ts)))
@@ -234,11 +234,11 @@
/* AIO operations. */
#define SMB_VFS_OPAQUE_AIO_READ(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_read((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_WRITE(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_write((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_RETURN(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_return((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_CANCEL(fsp,fd,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_cancel((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(fd),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_ERROR(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_error((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_OPAQUE_AIO_FSYNC(fsp,op,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_fsync((fsp)->conn->vfs_opaque.handles.aio_read,(fsp),(op),(aiocb)))
+#define SMB_VFS_OPAQUE_AIO_WRITE(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_write((fsp)->conn->vfs_opaque.handles.aio_write,(fsp),(aiocb)))
+#define SMB_VFS_OPAQUE_AIO_RETURN(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_return((fsp)->conn->vfs_opaque.handles.aio_return,(fsp),(aiocb)))
+#define SMB_VFS_OPAQUE_AIO_CANCEL(fsp,fd,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_cancel((fsp)->conn->vfs_opaque.handles.aio_cancel,(fsp),(fd),(aiocb)))
+#define SMB_VFS_OPAQUE_AIO_ERROR(fsp,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_error_fn((fsp)->conn->vfs_opaque.handles.aio_error,(fsp),(aiocb)))
+#define SMB_VFS_OPAQUE_AIO_FSYNC(fsp,op,aiocb)
((fsp)->conn->vfs_opaque.ops.aio_fsync((fsp)->conn->vfs_opaque.handles.aio_fsync,(fsp),(op),(aiocb)))
#define SMB_VFS_OPAQUE_AIO_SUSPEND(fsp,aiocb,n,ts)
((fsp)->conn->vfs_opaque.ops.aio_suspend((fsp)->conn->vfs_opaque.handles.aio_suspend,(fsp),(aiocb),(n),(ts)))
/*******************************************************************
@@ -345,11 +345,11 @@
/* AIO operations. */
#define SMB_VFS_NEXT_AIO_READ(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_read((handle)->vfs_next.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_write((handle)->vfs_next.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_return((handle)->vfs_next.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,fd,aiocb)
((handle)->vfs_next.ops.aio_cancel((handle)->vfs_next.handles.aio_read,(fsp),(fd),(aiocb)))
-#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_error((handle)->vfs_next.handles.aio_read,(fsp),(aiocb)))
-#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb)
((handle)->vfs_next.ops.aio_fsync((handle)->vfs_next.handles.aio_read,(fsp),(op),(aiocb)))
+#define SMB_VFS_NEXT_AIO_WRITE(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_write((handle)->vfs_next.handles.aio_write,(fsp),(aiocb)))
+#define SMB_VFS_NEXT_AIO_RETURN(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_return((handle)->vfs_next.handles.aio_return,(fsp),(aiocb)))
+#define SMB_VFS_NEXT_AIO_CANCEL(handle,fsp,fd,aiocb)
((handle)->vfs_next.ops.aio_cancel((handle)->vfs_next.handles.aio_cancel,(fsp),(fd),(aiocb)))
+#define SMB_VFS_NEXT_AIO_ERROR(handle,fsp,aiocb)
((handle)->vfs_next.ops.aio_error_fn((handle)->vfs_next.handles.aio_error,(fsp),(aiocb)))
+#define SMB_VFS_NEXT_AIO_FSYNC(handle,fsp,op,aiocb)
((handle)->vfs_next.ops.aio_fsync((handle)->vfs_next.handles.aio_error,(fsp),(op),(aiocb)))
#define SMB_VFS_NEXT_AIO_SUSPEND(handle,fsp,aiocb,n,ts)
((handle)->vfs_next.ops.aio_suspend((handle)->vfs_next.handles.aio_suspend,(fsp),(aiocb),(n),(ts)))
#endif /* _VFS_MACROS_H */
Index: include/vfs.h
===================================================================
--- include/vfs.h (revision 9068)
+++ include/vfs.h (working copy)
@@ -318,7 +318,7 @@
int (*aio_write)(struct vfs_handle_struct *handle, struct
files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
ssize_t (*aio_return)(struct vfs_handle_struct *handle,
struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb);
int (*aio_cancel)(struct vfs_handle_struct *handle, struct
files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb);
- int (*aio_error)(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)(struct vfs_handle_struct *handle, struct
files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb);
int (*aio_suspend)(struct vfs_handle_struct *handle,
struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n,
const struct timespec *timeout);
----------------------------
Jim McDonough
IBM Linux Technology Center
Samba Team
6 Minuteman Drive
Scarborough, ME 04074
USA
jmcd at us dot ibm dot com
jmcd at samba dot org
Phone: 1-877-228-1846
IBM tie-line: 349-5335
More information about the samba-technical
mailing list