File fragmentation

Matt McCutchen hashproduct+rsync at
Sat Aug 26 00:15:24 GMT 2006

On 8/25/06, Rob Bosch <robbosch at> wrote:
> This article suggests the ftruncate function is in the cygwin system
> (  Based on the
> open base specifications the ftruncate should allow the file to be resized
> to the desired level achieving what we want after the file is created?

I took a look at the change to linked from
that message and found that  posix_fallocate is the function we want.
Cygwin correctly implements it using SetEndOfFile.  So rsync's
configure script should check for posix_fallocate, and the receiver
should call it just after opening each received file.  I might write a
patch for this.


More information about the rsync mailing list