[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9500: [PATCH]: use posix_fallocate where supported

From: Pádraig Brady
Subject: bug#9500: [PATCH]: use posix_fallocate where supported
Date: Wed, 14 Sep 2011 15:46:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]