fsync.2, write.2: Minor tweaks to NeilBrown's patch

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-09-28 18:17:01 +02:00
parent 9c93cce7a7
commit c6822f6930
2 changed files with 16 additions and 13 deletions

View File

@ -121,14 +121,17 @@ is set appropriately.
is not a valid open file descriptor. is not a valid open file descriptor.
.TP .TP
.B EIO .B EIO
An error occurred during synchronization. This error may relate An error occurred during synchronization.
to data written to some other file descriptor on the same file. This error may relate to data written to some other file descriptor
on the same file.
Since Linux 4.13,
.\" commit 088737f44bbf6378745f5b57b035e57ee3dc4750 .\" commit 088737f44bbf6378745f5b57b035e57ee3dc4750
Since Linux 4.13, errors from write-back will be reported to errors from write-back will be reported to
all file descriptors that might have written the data which triggered all file descriptors that might have written the data which triggered
the error. Some filesystems (e.g. NFS) keep close track of which data the error.
Some filesystems (e.g., NFS) keep close track of which data
came through which file descriptor, and give more precise reporting. came through which file descriptor, and give more precise reporting.
Other filesystems (e.g. most local filesystems) will report errors to Other filesystems (e.g., most local filesystems) will report errors to
all file descriptors that where open on the file when the error was recorded. all file descriptors that where open on the file when the error was recorded.
.TP .TP
.B ENOSPC .B ENOSPC

View File

@ -181,11 +181,11 @@ or the file offset is not suitably aligned.
.TP .TP
.B EIO .B EIO
A low-level I/O error occurred while modifying the inode. A low-level I/O error occurred while modifying the inode.
This error may relate to the write-back of data written by an This error may relate to the write-back of data written by an earlier
earlier
.BR write (2), .BR write (2),
which may have been issued to a different file descriptor on which may have been issued to a different file descriptor on
the same file. Since Linux 4.13, errors from write-back come the same file.
Since Linux 4.13, errors from write-back come
with a promise that they with a promise that they
.I may .I may
be reported by subsequent. be reported by subsequent.
@ -239,11 +239,11 @@ A successful return from
.BR write () .BR write ()
does not make any guarantee that data has been committed to disk. does not make any guarantee that data has been committed to disk.
On some filesystems, including NFS, it does not even guarantee On some filesystems, including NFS, it does not even guarantee
that space has successfully been reserved for the data. In the case, that space has successfully been reserved for the data.
some errors might be delayed to a future In this case,
.BR write (2) some errors might be delayed until a future
or to .BR write (2),
.BR fsync (2) .BR fsync (2),
or even or even
.BR close (2). .BR close (2).
The only way to be sure is to call The only way to be sure is to call