This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 4/4] Remove broken posix_fallocate, posix_falllocate64 fallback code [BZ#15661]
- From: Rich Felker <dalias at libc dot org>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Wed, 6 May 2015 19:30:55 -0400
- Subject: Re: [PATCH 4/4] Remove broken posix_fallocate, posix_falllocate64 fallback code [BZ#15661]
- Authentication-results: sourceware.org; auth=none
- References: <20150424134516 dot 6795441F484D0 at oldenburg dot str dot redhat dot com> <554927F9 dot 7080509 at redhat dot com> <5549C097 dot 50505 at redhat dot com> <554A9A46 dot 2050806 at cs dot ucla dot edu>
On Wed, May 06, 2015 at 03:48:38PM -0700, Paul Eggert wrote:
> Florian Weimer wrote:
> >Maybe we could remove the write loop and perform only an ftruncate call
> >which (hopefully) increases the file size. This would take care of the
> >O_APPEND issue and remove most of the races.
>
> I like this idea.
If I'm not mistaken ftruncate could still reduce the file size if it
races with another operation that would extend the file. This is also
a data loss bug.
Rich