Files open O_WRONLY not supported in fallocate emulation.
authorCarlos O'Donell <carlos@systemhalted.org>
Tue, 29 Sep 2015 15:32:36 +0000 (11:32 -0400)
committerCarlos O'Donell <carlos@systemhalted.org>
Tue, 29 Sep 2015 15:32:36 +0000 (11:32 -0400)
commit032f2250086fec2ebda3832f260c3a8955cf281f
tree509904fa7c31566007e457d31a3c313e562a24da
parenta5721ebc68cc8b761b0ffdf6dcae52723369e071
Files open O_WRONLY not supported in fallocate emulation.

In the posix_fallocate description in the manual we list various
drawbacks with the emulation, including the fact that a file opened
with O_APPEND fails with EBADF. Similarly a file opened with O_WRONLY
fails with EBADF. We must be able to emulate a compare-and-swap via
pread/compare/pwrite in order to make the emulation as safe as possible.
It is not acceptable to ignore the read failure because it could result
in significant data loss across all of the blocks. There is no other way
to make this work without a true atomic CAS and SIGBUS handler (which
is looking more attractive as a way to remove the race condition).

This patch adds O_WRONLY to the manual as another bullet to clarify the
limits of the emulation.

Manual looks good in PDF.
ChangeLog
manual/filesys.texi