Linux-man Archive on lore.kernel.org
 help / color / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][man-pages] sync.2: syncfs() now returns errors if writeback fails
Date: Wed, 10 Jun 2020 17:19:22 -0400
Message-ID: <fe141babe698296f96fde39a8da85005506fd0f0.camel@kernel.org> (raw)
In-Reply-To: <20200610155013.GA1339@sol.localdomain>

On Wed, 2020-06-10 at 08:50 -0700, Eric Biggers wrote:
> On Wed, Jun 10, 2020 at 06:33:47AM -0400, Jeff Layton wrote:
> > A patch has been merged for v5.8 that changes how syncfs() reports
> > errors. Change the sync() manpage accordingly.
> > 
> > Signed-off-by: Jeff Layton <jlayton@kernel.org>
> > ---
> >  man2/sync.2 | 24 +++++++++++++++++++++++-
> >  1 file changed, 23 insertions(+), 1 deletion(-)
> > 
> > diff --git a/man2/sync.2 b/man2/sync.2
> > index 7198f3311b05..27e04cff5845 100644
> > --- a/man2/sync.2
> > +++ b/man2/sync.2
> > @@ -86,11 +86,26 @@ to indicate the error.
> >  is always successful.
> >  .PP
> >  .BR syncfs ()
> > -can fail for at least the following reason:
> > +can fail for at least the following reasons:
> >  .TP
> >  .B EBADF
> >  .I fd
> >  is not a valid file descriptor.
> > +.TP
> > +.B EIO
> > +An error occurred during synchronization.
> > +This error may relate to data written to any file on the filesystem, or on
> > +metadata related to the filesytem itself.
> > +.TP
> > +.B ENOSPC
> > +Disk space was exhausted while synchronizing.
> > +.TP
> > +.BR ENOSPC ", " EDQUOT
> > +Data was written to a files on NFS or another filesystem which does not
> > +allocate space at the time of a
> > +.BR write (2)
> > +system call, and some previous write failed due to insufficient
> > +storage space.
> >  .SH VERSIONS
> >  .BR syncfs ()
> >  first appeared in Linux 2.6.39;
> > @@ -121,6 +136,13 @@ or
> >  .BR syncfs ()
> >  provide the same guarantees as fsync called on every file in
> >  the system or filesystem respectively.
> > +.PP
> > +In mainline kernel versions prior to 5.8,
> > +.\" commit 735e4ae5ba28c886d249ad04d3c8cc097dad6336
> > +.BR syncfs ()
> > +will only fail with EBADF when passed a bad file descriptor. In 5.8
> > +and later kernels, it will also report an error if one or more inodes failed
> > +to be written back since the last syncfs call.
> 
> The sentence "In mainline kernel versions prior to 5.8, syncfs() will only fail
> with EBADF when passed a bad file descriptor" is ambiguous.  It could mean that
> EBADF can now mean other things too.
> 
> Maybe write: "In mainline kernel versions prior to 5.8, syncfs() will only fail
> when passed a bad file descriptor (EBADF)."
> 
> - Eric

Good point. Fixed in my tree using your verbiage. I'll send out a v2
patch once I give others a chance to comment.

Thanks!
-- 
Jeff Layton <jlayton@kernel.org>


  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 10:33 Jeff Layton
2020-06-10 15:50 ` Eric Biggers
2020-06-10 21:19   ` Jeff Layton [this message]
2020-06-25  9:45     ` Michael Kerrisk (man-pages)
2020-06-25 23:37       ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe141babe698296f96fde39a8da85005506fd0f0.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=ebiggers@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-man Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-man/0 linux-man/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-man linux-man/ https://lore.kernel.org/linux-man \
		linux-man@vger.kernel.org
	public-inbox-index linux-man

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-man


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git