This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18515] posix_fallocate disastrous fallback behavior is no longer mandated by POSIX and should be fixed
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 01 Oct 2015 12:55:50 +0000
- Subject: [Bug libc/18515] posix_fallocate disastrous fallback behavior is no longer mandated by POSIX and should be fixed
- Auto-submitted: auto-generated
- References: <bug-18515-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18515
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |fweimer at redhat dot com
Resolution|--- |WONTFIX
Flags| |security-
--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Pat from comment #0)
> The fallback behavior of posix_fallocate() is a disaster. The entire point
> of this function is to improve system performance by allowing applications
> to preallocate large extents, helping the O/S to minimize on-disk
> fragmentation.
>
> But the behavior of this call on file systems lacking unwritten extents
> ultimately results in two writes to every "preallocated" block: Once to
> "preallocate", and once to populate with actual data. This is the exact
> opposite of a performance improvement.
Callers who want to avoid double-writes can use fallocate instead. This is
explained in the glibc manual.
We analyzed this issue recently, and we decided that we have to preserve the
fallback (note that I completely changed my opinion after reviewing how
application code uses posix_fallocate right now):
https://sourceware.org/ml/libc-alpha/2015-04/msg00309.html
https://sourceware.org/ml/libc-alpha/2015-05/msg00058.html
So we really can't fix this bug, even though fallback is problematic.
--
You are receiving this mail because:
You are on the CC list for the bug.