Add more documentation regarding unsafe AIO requests.
authorjhb <jhb@FreeBSD.org>
Thu, 21 Jul 2016 22:49:47 +0000 (22:49 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 21 Jul 2016 22:49:47 +0000 (22:49 +0000)
commit6db41da76804e987bfe9bf656842da0ae5058519
treebc6551d96b5311a4b57eb43c455a1ec8701a0cfb
parentbe7a80e92defb4c85677dd5bffa1db5427690698
Add more documentation regarding unsafe AIO requests.

The asynchronous I/O changes made previously result in different
behavior out of the box. Previously all AIO requests failed with
ENOSYS / SIGSYS unless aio.ko was explicitly loaded. Now, some AIO
requests complete and others ("unsafe" requests) fail with EOPNOTSUPP.

Reword the introductory paragraph in aio(4) to add a general
description of AIO before describing the vfs.aio.enable_unsafe sysctl.

Remove the ENOSYS error description from aio_fsync(2), aio_read(2),
and aio_write(2) and replace it with a description of EOPNOTSUPP.

Remove the ENOSYS error description from aio_mlock(2).

Log a message to the system log the first time a process requests an
"unsafe" AIO request that fails with EOPNOTSUPP. This is modeled on
the log message used for processes using the legacy pty devices.

Reviewed by: kib (earlier version)
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7151
lib/libc/sys/aio_fsync.2
lib/libc/sys/aio_mlock.2
lib/libc/sys/aio_read.2
lib/libc/sys/aio_write.2
share/man/man4/aio.4
sys/kern/vfs_aio.c