Hi
The aio_fsync() function does a sync on all outstanding asynchronous I/O operations associated with aiocbp->aio_fildes
I think the word "asynchronous" here is spurious (or confusing, or in
the wrong position :-). Can that word be removed?
The operation would be much more useful if it synced dirty pages
generated by write(), as well as those generated by aio_write(). It
should always work that way on Linux, and it is what POSIX appears to
say as well:
The aio_fsync() function shall asynchronously perform a file synchronization operation, as specified by the op argument, for ** I/O operations associated with the file indicated by the file descriptor aio_fildes member of the aiocb structure ** referenced by the aiocbp argument and queued at the time of the call to aio_fsync().
http://pubs.opengroup.org/onlinepubs/9699919799/functions/aio_fsync.html
I suspect this manpage was the reason for this quote:
I'm not even convinced it's possible with the existing interfaces (but I have no experience with AIO). aio_fsync() is only usable with aio_write()
https://lists.debian.org/debian-dpkg/2011/03/msg00022.html
[I've been thinking about whether aio_fsync() would do *exactly* what
dpkg wants, and could speed it up further, as I suspect from some points
made by Dave Chinner :-).]
Thanks for all the docs!
Alan