From: Jeff Layton Date: Wed, 29 May 2019 18:35:11 +0000 (-0400) Subject: doc: cephfs: add section on fsync error reporting to posix.rst X-Git-Tag: v13.2.7~168^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cf2dafaac5bc61754966d7d6615eafa210ea6f9;p=ceph.git doc: cephfs: add section on fsync error reporting to posix.rst Fixes: http://tracker.ceph.com/issues/24641 Signed-off-by: Jeff Layton (cherry picked from commit b52d85c2a71950db222e3649d5265e5891368ba1) --- diff --git a/doc/cephfs/posix.rst b/doc/cephfs/posix.rst index 3cd59ec575bc..23531693f6fe 100644 --- a/doc/cephfs/posix.rst +++ b/doc/cephfs/posix.rst @@ -80,3 +80,22 @@ than NFS when it comes to write atomicity. In other words, when it comes to POSIX, :: HDFS < NFS < CephFS < {XFS, ext4} + + +fsync() and error reporting +--------------------------- + +POSIX is somewhat vague about the state of an inode after fsync reports +an error. In general, CephFS uses the standard error-reporting +mechanisms in the client's kernel, and therefore follows the same +conventions as other filesystems. + +In modern Linux kernels (v4.17 or later), writeback errors are reported +once to every file description that is open at the time of the error. In +addition, unreported errors that occured before the file description was +opened will also be returned on fsync. + +See `PostgreSQL's summary of fsync() error reporting across operating systems +` and `Matthew Wilcox's +presentation on Linux IO error handling +` for more information.