preallocate CPU usage - pre4
Jamie Lokier
jamie at shareable.org
Sat Feb 23 23:07:27 GMT 2008
Rob Bosch wrote:
> I took a stab at modifying the preallocate.diff patch file replacing it with
> ftruncate (attached). Do you think the file looks OK for Linux (obviously
> cygwin should use posix_fallocate)? I replaced posix_fallocate with
> ftruncate and also removed the check for HAVE_POSIX_FALLOCATE.
>
> Maybe this should be preallocate-linux.diff?
How will this help on Linux? Changing the file size with ftruncate()
doesn't change the allocation process of disk blocks at all on
standard Linux filesystems; it just changes the size field in the
inode.
You can preallocate file space with recent Linux kernels, but it's not
done with ftruncate().
-- Jamie
More information about the rsync
mailing list