FAT | XFS

aio_high()

PROTOTYPE

#include <posix.h>

int aio_high(int fid);

DESCRIPTION

aio_high() is a non-standard routine that returns the maximum backlog of asynchronous I/O (AIO) buffers for the open regular file specified by fid. For streaming reads, this is the maximum number of buffers filled by the AIO task but not yet read by the application. For streaming writes, this is the maximum number of buffers filled by application writes but not yet written to the file system.

The number of required AIO buffers can be determined by initially allocating an overly large number of buffers via aio_set(), running stress tests, and then calling aio_high() to learn the maximum number of buffers actually used.

If successful, aio_high() returns the buffer queue’s high water mark. Otherwise, it sets errno and returns -1.

ERROR CODES

EBADF fid is not the descriptor of an open file.
EISDIR fid refers to a directory.

EXAMPLE

  rc = aio_high(fid);
  if (rc >= 0)
    printf("asynch I/O high buffer use mark = %u/%u\n", rc, NumBufs);