[Bug 11588] missing option: preallocate for all files except for sparse

samba-bugs at samba.org samba-bugs at samba.org
Sat Oct 8 16:44:44 UTC 2016


https://bugzilla.samba.org/show_bug.cgi?id=11588

--- Comment #4 from Carson Gaspar <carson at taltos.org> ---
rsync currently just has the receiver turn "long" sequences of zeroes into
sparse regions when --sparse is specified. If --preallocate is also specified,
what would you like rsync to do?

No wire protocol change required (please pick which behaviour you prefer even
if you'd rather a protocol bump, as we may negotiate an older wire protocol):
1) Emit an error (as with --in-place and --sparse)
2) Disable one of the options (which one?)
3) Pre-allocate the file, but when zero regions are detected then ftruncate()
it and create the sparse region. Reallocate the rest of the file space after
creating the sparse region or not? (IFF receiver is on Linux and on a supported
filesystem, fallocate(,FALLOC_FL_PUNCH_HOLE,...) could be used to create sparse
regions without truncating the file)

Wire protocol change required, have the sender determine the sparse regions,
using SEEK_HOLE if available, otherwise scanning for all-zero regions:
A) Preallocate 1st data region, create 1st sparse region, preallocate 2nd data
region, ...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.



More information about the rsync mailing list