GNU bug report logs - #9500
cp: use posix_fallocate where supported

Previous Next

Package: coreutils;

Reported by: Kelly Anderson <kelly <at> silka.with-linux.com>

Date: Wed, 14 Sep 2011 06:47:02 UTC

Severity: wishlist

Tags: patch

Full log


Message #11 received at 9500 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: 9500 <at> debbugs.gnu.org, Kelly Anderson <kelly <at> silka.with-linux.com>
Subject: Re: bug#9500: [PATCH]: use posix_fallocate where supported
Date: Wed, 14 Sep 2011 15:46:47 +0100
On 09/14/2011 03:06 PM, Eric Blake wrote:
> On 09/13/2011 11:55 PM, Kelly Anderson wrote:
>> Hi,
>>
>> I put together a patch 2 or 3 years ago (back when posix_fallocate was
>> first introduced in glibc).
> 
> Thanks for the effort.  However, this has been discussed in the past, and the consensus was that we should first write a patch to gnulib that provides a posix_fallocate() stub for all platforms, so that coreutils can unconditionally call posix_fallocate, rather than making coreutils have to use #ifdef.  Among other things, a gnulib module would make it possible to emulate posix_fallocate() even on older glibc where it is missing or broken.
> 

Also we probably want fallocate() for this use case
rather than posix_fallocate() in any case,
as we don't want to fall back to writing zeros.

Also I had a whole lot of fallocate() things to try
once the fiemap() stuff landed, but unfortunately
that doesn't work reliably on all file systems
and is currently restricted to sparse files.
So I need to dig out my notes on how to apply
fallocate() to files with holes and "empty portions" again.

cheers,
Pádraig.




This bug report was last modified 6 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.