Bug 194757 - fsync man page should mention that EIO and ENOSPC are cleared
Summary: fsync man page should mention that EIO and ENOSPC are cleared
Status: NEW
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-02 03:21 UTC by Craig Ringer
Modified: 2020-08-30 05:43 UTC (History)
2 users (show)

See Also:
Kernel Version:
Tree: Mainline
Regression: No


Attachments
Add a NOTE to fsync man page that errors are cleared on return (912 bytes, application/mbox)
2017-03-02 03:21 UTC, Craig Ringer
Details

Description Craig Ringer 2017-03-02 03:21:05 UTC
Created attachment 255041 [details]
Add a NOTE to fsync man page that errors are cleared on return

The fsync man page does not mention that when fsync returns EIO or ENOSPC, the error flag in the mapping is cleared. A subsequent call to fsync() of the same FD will succeed. It is thus not safe to retry fsync on EIO or ENOSPC and assume that 0 return means writes prior to the first fsync() call are on disk.

See http://stackoverflow.com/q/42434872/398670 for kernel source details, a demo/test program, etc.

Attached is draft wording for this.

(Following on from #194755)
Comment 1 Milan Shah 2020-08-30 05:43:29 UTC
Sent patch
to:	mtk.manpages@gmail.com
cc:	linux-kernel@vger.kernel.org

Note You need to log in before you can comment on or make changes to this bug.