mirror of https://github.com/mkerrisk/man-pages
sync.2: syncfs() now returns errors if writeback fails
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> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
aeaf667ec3
commit
7b9af2eb80
24
man2/sync.2
24
man2/sync.2
|
@ -86,11 +86,26 @@ to indicate the error.
|
||||||
is always successful.
|
is always successful.
|
||||||
.PP
|
.PP
|
||||||
.BR syncfs ()
|
.BR syncfs ()
|
||||||
can fail for at least the following reason:
|
can fail for at least the following reasons:
|
||||||
.TP
|
.TP
|
||||||
.B EBADF
|
.B EBADF
|
||||||
.I fd
|
.I fd
|
||||||
is not a valid file descriptor.
|
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
|
.SH VERSIONS
|
||||||
.BR syncfs ()
|
.BR syncfs ()
|
||||||
first appeared in Linux 2.6.39;
|
first appeared in Linux 2.6.39;
|
||||||
|
@ -121,6 +136,13 @@ or
|
||||||
.BR syncfs ()
|
.BR syncfs ()
|
||||||
provide the same guarantees as fsync called on every file in
|
provide the same guarantees as fsync called on every file in
|
||||||
the system or filesystem respectively.
|
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
|
.SH BUGS
|
||||||
Before version 1.3.20 Linux did not wait for I/O to complete
|
Before version 1.3.20 Linux did not wait for I/O to complete
|
||||||
before returning.
|
before returning.
|
||||||
|
|
Loading…
Reference in New Issue