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: v15.1.0~2582^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b52d85c2a71950db222e3649d5265e5891368ba1;p=ceph-ci.git doc: cephfs: add section on fsync error reporting to posix.rst Fixes: http://tracker.ceph.com/issues/24641 Signed-off-by: Jeff Layton --- diff --git a/doc/cephfs/posix.rst b/doc/cephfs/posix.rst index 3cd59ec575b..23531693f6f 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.