From b52d85c2a71950db222e3649d5265e5891368ba1 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 29 May 2019 14:35:11 -0400 Subject: [PATCH] doc: cephfs: add section on fsync error reporting to posix.rst Fixes: http://tracker.ceph.com/issues/24641 Signed-off-by: Jeff Layton --- doc/cephfs/posix.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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. -- 2.39.5