Reading for area during rsync

Matt McCutchen hashproduct at verizon.net
Wed Feb 1 03:46:49 GMT 2006


On Tue, 2006-01-31 at 09:52 -0800, Wayne Davison wrote:
> On Mon, Jan 30, 2006 at 11:36:31PM +0000, Jamie Lokier wrote:
> > But this won't work if the change that occurred on the sending side
> > after the transfer started happens within the same second, and the
> > mtimes have only one second resolution, will it?
> 
> If the file was changed twice in the same second, the first prior to
> when rsync called stat() on the file, and the second immediately after.

There's an incredibly simple way to stop such unlucky modifications from
corrupting the transfer.  Rsync could wait for the second named in a
file's modtime to complete (i.e. until the system clock has moved on to
the next second) before beginning to read that file!  There are some
complications with modtimes set in the future, though.
-- 
Matt McCutchen
hashproduct at verizon.net
http://mysite.verizon.net/hashproduct/



More information about the rsync mailing list