This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libelf: Use possix_fallocate instead of ftruncate to extend ELF file.
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 15 May 2015 12:08:42 +0200
- Subject: Re: [PATCH] libelf: Use possix_fallocate instead of ftruncate to extend ELF file.
On Thu, 2015-05-14 at 09:44 -0700, Josh Stone wrote:
> On 05/14/2015 03:44 AM, Mark Wielaard wrote:
> > diff --git a/libelf/ChangeLog b/libelf/ChangeLog
> > index 2d10b83..5e7b104 100644
> > --- a/libelf/ChangeLog
> > +++ b/libelf/ChangeLog
> > @@ -1,3 +1,8 @@
> > +2015-05-14 Mark Wielaard <firstname.lastname@example.org>
> > +
> > + * elf_update.c (write_file): Use possix_fallocate instead of
> > + ftruncate to extend file if necessary.
> Just one 's' in posix -- also mistyped in the subject line.
Worse, also mistyped in the patch as posted though not in the commit on
the branch, since obviously I noticed it didn't compile and fixed it,
but somehow still posted the broken patch...
Fixed it everywhere and updated the mjw/pending branch. Not pushing yet.
I would like to know what others think about using posix_fallocate
instead of ftruncate. There is some discussion on the glibc mailinglist
about whether or not posix_fallocate actually guarantees to extend the
file or not. I think it does, that is the main difference with fallocate
(and ftruncate). But lets see what glibc ends up deciding.