Date: Sat, 17 May 2008 00:57:32 +0300 From: Oleksandr Tymoshenko <gonzo@pbxpress.com> To: freebsd-hackers@freebsd.org Subject: aio_write issues Message-ID: <482E034C.2080402@pbxpress.com>
next in thread | raw e-mail | index | archive | help
It looks like aio_write is out of sync with its man page(if it ever has been).
man 2 aio_write states:
If O_APPEND is set for iocb->aio_fildes, aio_write() operations append to
the file in the same order as the calls were made.
Though simple test[1] reveals that it's not true. Order is not preserved. In addition
the rest of the paragraph contradicts to SUSv3 specification of aio_write (or I got that
part of man page wrong, because function behaves just as should be conforming
to SUSv3).
man page:
If O_APPEND is not set for the file descriptor, the write operation
will occur at the absolute position from the beginning of the file
plus iocb->aio_offset.
excerpt from IEEE 1003.1:
If O_APPEND is not set for the file descriptor aio_fildes, then the requested
operation shall take place at the absolute position in the file as given by
aio_offset, as if lseek() were called immediately prior to the operation with
an offset equal to aio_offset and a whence equal to SEEK_SET.
I'd like to know if I got things right in order to avoid fixing things
that are not broken.
[1] http://people.freebsd.org/~gonzo/aio.c
--
gonzo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?482E034C.2080402>
