[Bug libc/18515] posix_fallocate disastrous fallback behavior is no longer mandated by POSIX and should be fixed
carlos at redhat dot com
sourceware-bugzilla@sourceware.org
Fri Oct 2 03:17:00 GMT 2015
https://sourceware.org/bugzilla/show_bug.cgi?id=18515
--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #2)
> (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.
Agreed. I'll submit an update to the linux kernel man pages to mention this
there also.
c.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list