AIX and aio

William Jojo jojowil at
Fri Aug 5 12:25:59 GMT 2005

On Thu, 4 Aug 2005, Jim McDonough wrote:

> AIX does something really great in aio.h and sys/aio.h:  #define
> aio_error(h)    ((h)->aio_errno)

This should only be defined if you have _AIO_AIX_SOURCE.

There *is* a bug in the header file near the bottom which I'm opening a
PMR on with respect to aio_return being redefined to aio_return64. The
line reads:

#define aio_return(h)   aio_return64(h)

but should be

#define aio_return   aio_return64

> As a result, macros such as SMB_VFS_NEXT_AIO_ERROR() fail, because the
> function pointer member of the vfs structure is named aio_error, and it
> takes 3 parms.  It seems we either need to change that member name, or not
> use aio on aix...
> Also, I noticed in vfs_macros.h, all the opaque aio macros use the handle
> from aio_read, which looks like a cut/paste error, as continues
> through the whole section.
> #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)))

These are correct. I do have AIO running on AIX 5.2 and 5.3 in rc1. I sent
a patch for last week to fix the detection problems.



> I'm assuming that was just cut/paste, but someone who knows what they're
> doing should probably check it.
> ----------------------------
> Jim McDonough
> IBM Linux Technology Center
> Samba Team
> 6 Minuteman Drive
> Scarborough, ME 04074
> 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