From c6822f6930a4625ffb968a7fa3216be173402889 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 28 Sep 2017 18:17:01 +0200 Subject: [PATCH] fsync.2, write.2: Minor tweaks to NeilBrown's patch Signed-off-by: Michael Kerrisk --- man2/fsync.2 | 13 ++++++++----- man2/write.2 | 16 ++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/man2/fsync.2 b/man2/fsync.2 index c7878bf34..1c83b7ee1 100644 --- a/man2/fsync.2 +++ b/man2/fsync.2 @@ -121,14 +121,17 @@ is set appropriately. is not a valid open file descriptor. .TP .B EIO -An error occurred during synchronization. This error may relate -to data written to some other file descriptor on the same file. +An error occurred during synchronization. +This error may relate to data written to some other file descriptor +on the same file. +Since Linux 4.13, .\" 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 -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. -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. .TP .B ENOSPC diff --git a/man2/write.2 b/man2/write.2 index b1cc3a2cf..796cae8ba 100644 --- a/man2/write.2 +++ b/man2/write.2 @@ -181,11 +181,11 @@ or the file offset is not suitably aligned. .TP .B EIO A low-level I/O error occurred while modifying the inode. -This error may relate to the write-back of data written by an -earlier +This error may relate to the write-back of data written by an earlier .BR write (2), 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 .I may be reported by subsequent. @@ -239,11 +239,11 @@ A successful return from .BR write () does not make any guarantee that data has been committed to disk. On some filesystems, including NFS, it does not even guarantee -that space has successfully been reserved for the data. In the case, -some errors might be delayed to a future -.BR write (2) -or to -.BR fsync (2) +that space has successfully been reserved for the data. +In this case, +some errors might be delayed until a future +.BR write (2), +.BR fsync (2), or even .BR close (2). The only way to be sure is to call