Large File-Enabled Asynchronous I/O

The fundamental data structure associated with all AIO operations is struct aiocb. Within this structure is the aio_offset field, which is used to specify the offset for an I/O operation.

Due to the signed 32-bit definition of aio_offset, the default AIO interfaces are limited to an offset of 2Gb minus 1. To overcome this limitation, a new AIO control block with a signed 64-bit offset field and a new set of AIO interfaces has been defined. These 64-bit definitions end with "64."

The large offset-enabled AIO interfaces are available under the _LARGE_FILES compilation environment and under the _LARGE_FILE_API programming environment. For further information, see Writing Programs That Access Large Files in AIX® Version 7.1 General Programming Concepts: Writing and Debugging Programs.

Under the _LARGE_FILES compilation environment, AIO applications written to the default interfaces interpret the following redefinitions:

Item Redefined To Be Header File
struct aiocb struct aiocb64 sys/aio.h
aio_read() aio_read64() sys/aio.h
aio_write() aio_write64() sys/aio.h
aio_cancel() aio_cancel64() sys/aio.h
aio_suspend() aio_suspend64() sys/aio.h
aio_listio() aio_listio64() sys/aio.h
aio_return() aio_return64() sys/aio.h
aio_error() aio_error64() sys/aio.h

For information on using the _LARGE_FILES environment, see Porting Applications to the Large File Environment in AIX Version 7.1 General Programming Concepts: Writing and Debugging Programs.

In the _LARGE_FILE_API environment, the 64-bit application programming interfaces (APIs) are visible. This environment requires recoding of applications to the new 64-bit API name. For further information on using the _LARGE_FILE_API environment, see Using the 64-Bit File System Subroutines in AIX Version 7.1 General Programming Concepts: Writing and Debugging Programs.