Date: Thu, 26 Dec 2013 21:44:45 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: Sergey Kandaurov <pluknet@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r259921 - head/lib/libc/sys Message-ID: <20131226204445.GA54038@stack.nl> In-Reply-To: <201312261916.rBQJGVcs034015@svn.freebsd.org> References: <201312261916.rBQJGVcs034015@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 26, 2013 at 07:16:31PM +0000, Sergey Kandaurov wrote: > Author: pluknet > Date: Thu Dec 26 19:16:30 2013 > New Revision: 259921 > URL: http://svnweb.freebsd.org/changeset/base/259921 > Log: > Provide the manual page for aio_fsync(2). > Reviewed by: davidxu > MFC after: 1 week > Added: head/lib/libc/sys/aio_fsync.2 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/lib/libc/sys/aio_fsync.2 Thu Dec 26 19:16:30 2013 (r259921) > @@ -0,0 +1,152 @@ > [snip] > +The > +.Fa op > +argument could be set only to I suppose the op argument "must" be set to O_SYNC, rather than "could only" be set to O_SYNC. Alternatively, it "can only" be set to O_SYNC. > +.Dv O_SYNC > +to cause all currently queued I/O operations to be completed > +as if by a call to > +.Xr fsync 2 . > +.Pp > [snip] > +.Bl -tag -width Er > +.It Bq Er EBADF > +The > +.Fa iocb->aio_fildes > +is invalid for writing. This is what current POSIX standards say, but it does not make sense and does not work that way. Any open file descriptor is sufficient, since the access mode does not affect whether there are pending I/O operations on the underlying file. See http://austingroupbugs.net/view.php?id=671 which FreeBSD already implements (from reading the code). The text from fsync(2) can be used: .It Bq Er EBADF The .Fa iocb->aio_fildes argument is not a valid descriptor. > [snip] > +.Pp > +If the request is successfully enqueued, but subsequently cancelled > +or an error occurs, the value returned by the > +.Fn aio_return > +system call is per the > +.Xr read 2 > +and > +.Xr write 2 > +system calls, and the value returned by the > +.Fn aio_error > +system call is one of the error returns from the > +.Xr read 2 > +or > +.Xr write 2 > +system calls. The reference to read() and write() is in fact correct, and is missing from the fsync(2) page. For example, [EDQUOT] or [ENOSPC] may be seen on a network filesystem. > [snip] -- Jilles Tjoelker
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131226204445.GA54038>