DO NOT REPLY [Bug 3925] rsync is unable to sync large (approx 4G) sparse files

samba-bugs at samba-bugs at
Wed Nov 12 01:39:28 GMT 2008

pvf at changed:

           What    |Removed                     |Added
                 CC|                            |pvf at

------- Comment #5 from pvf at  2008-11-11 19:39 CST -------
on file "fileio.c", line 31:
static size_t sparse_seek = 0;

size_t is 4 bytes (4GB), at least on my six years old P4, don't know in 64 bits

So if there are more than 4GB consecutive zeros, the "sparse_seek" variable
overflows, and things go wrong... but the size of the file changes, so I'm not
sure if this is related to this thread.

just change it to:
static off_t sparse_seek = 0;

and it works, or at least it looks like it works :). Maybe some more in deep
look should be taken on the "sparse" code (also happens with l1 and l2, but I
don't think anyone is going to have a +4GB buffer...)

Oh! this is in, at least, rsync 3.0.4 and on my gentoo 3.0.3... maybe much
earlier too...

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list