From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: mtk.manpages@gmail.com, linux-man@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
ebiggers@kernel.org
Subject: Re: [PATCH v2] sync.2: syncfs() now returns errors if writeback fails
Date: Fri, 26 Jun 2020 11:06:19 +0200 [thread overview]
Message-ID: <3e2d6625-72bd-324c-b6d3-4e2a4bc5e369@gmail.com> (raw)
In-Reply-To: <20200625233731.61555-1-jlayton@kernel.org>
Hi Jeff,
On 6/26/20 1:37 AM, 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>
Thanks. Patch applied. (I've not yet pushed it, in case any
review comments might still come in.)
Cheers,
Michael
> ---
> man2/sync.2 | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> v2: update the NOTES verbiage according to Eric's suggestion
>
> diff --git a/man2/sync.2 b/man2/sync.2
> index 7198f3311b05..61e994c5affc 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 when passed a bad file descriptor (EBADF). 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.
> .SH BUGS
> Before version 1.3.20 Linux did not wait for I/O to complete
> before returning.
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
prev parent reply other threads:[~2020-06-26 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 23:37 [PATCH v2] sync.2: syncfs() now returns errors if writeback fails Jeff Layton
2020-06-26 9:06 ` Michael Kerrisk (man-pages) [this message]
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=3e2d6625-72bd-324c-b6d3-4e2a4bc5e369@gmail.com \
--to=mtk.manpages@gmail.com \
--cc=ebiggers@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-man@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).