This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.22-305-g032f225
- From: carlos at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 29 Sep 2015 15:34:15 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.22-305-g032f225
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 032f2250086fec2ebda3832f260c3a8955cf281f (commit)
from a5721ebc68cc8b761b0ffdf6dcae52723369e071 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=032f2250086fec2ebda3832f260c3a8955cf281f
commit 032f2250086fec2ebda3832f260c3a8955cf281f
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Tue Sep 29 11:32:36 2015 -0400
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.
diff --git a/ChangeLog b/ChangeLog
index 8b5050b..8851c6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-29 Carlos O'Donell <carlos@redhat.com>
+
+ * manual/filesys.texi (Storage Allocation): Document that
+ posix_fallocate emulation fails when fd is open with O_WRONLY.
+
2015-09-28 Joseph Myers <joseph@codesourcery.com>
[BZ #19016]
diff --git a/manual/filesys.texi b/manual/filesys.texi
index ed4f5fd..4064885 100644
--- a/manual/filesys.texi
+++ b/manual/filesys.texi
@@ -3300,6 +3300,10 @@ underlying file in the to-be-allocated area. Non-null bytes could be
overwritten with null bytes.
@item
+If @var{fd} has been opened with the @code{O_WRONLY} flag, the function
+will fail with an @code{errno} value of @code{EBADF}.
+
+@item
If @var{fd} has been opened with the @code{O_APPEND} flag, the function
will fail with an @code{errno} value of @code{EBADF}.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
manual/filesys.texi | 4 ++++
2 files changed, 9 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources