From owner-svn-src-head@FreeBSD.ORG Fri Dec 27 17:01:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F960546; Fri, 27 Dec 2013 17:01:48 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 83C811EEE; Fri, 27 Dec 2013 17:01:47 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id x13so8416943wgg.7 for ; Fri, 27 Dec 2013 09:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=oxGQUZh3Or8jfSfi3Lrq39gSAvb30fffWEXkzbQ581I=; b=Gu4LZSHiNSIX3EZaF8b5HDXg6JITITjYgL6uXZLfZMIUXvV2uOsclcIyX87OQTRGSm AoSr0HGueIr6NgABZ8SvAualcqROSgWe0BEoq1II2NmAt6vhlDljKsSQSgZYnSGZ5f6m rI1Aw0EhFi4cqpeXChKbgR0J997dLM1uxrQ1Q371MiJFapMPG7IxfK4sMVpqa5OIWYmQ Vi0DYBiow6J52EBqjS3yK+MDsO+LGVdZTiYy2WYE/obKLIaYZt+s12ZG2MaiV0lklakC ztObe+r1HN8v6CvNw9D0v3qekbcnd81/fxqhi8wss293wLiZI4HynMOXLPGtLTn7WFbC rSbw== MIME-Version: 1.0 X-Received: by 10.180.108.132 with SMTP id hk4mr34743908wib.12.1388163705169; Fri, 27 Dec 2013 09:01:45 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.217.117.197 with HTTP; Fri, 27 Dec 2013 09:01:45 -0800 (PST) In-Reply-To: <20131226204445.GA54038@stack.nl> References: <201312261916.rBQJGVcs034015@svn.freebsd.org> <20131226204445.GA54038@stack.nl> Date: Fri, 27 Dec 2013 21:01:45 +0400 X-Google-Sender-Auth: j8JQRW94ibYhIxDaQJRSUQwyQOw Message-ID: Subject: Re: svn commit: r259921 - head/lib/libc/sys From: Sergey Kandaurov To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Dec 2013 17:01:48 -0000 On 27 December 2013 00:44, Jilles Tjoelker wrote: > 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. Thank you for feedback. Right, this can/could was overlooked. > >> +.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. This was one of those tricky parts in writing this man page... > >> [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. Ok. -- wbr, pluknet