Flag "volatile" files when creating a snapshot.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Mon, 3 Dec 2007 19:10:48 +0000 (11:10 -0800)
committerMichael Vrable <mvrable@turin.ucsd.edu>
Mon, 3 Dec 2007 19:10:48 +0000 (11:10 -0800)
If a file has changed very near to the time it was backed up (right now 30
seconds, though this could probably be decreased to only a few seconds),
mark the file as "volatile" and do not use the stat information to skip
that file on the next backup.  This is to avoid a race condition where a
file's stat information is saved, the file is dumped, and then the file is
modified again.  If this happens within the same second as the earlier
modifications, then mtime and ctime will not be updated (since they already
refer to the current second), and on a subsequent backup the file would not
be stored since it appears to be unchanged.  However, if the file's mtime
and ctime are in the past, then this can't happen, so use this as a test
for when it is safe to skip apparently unchanged files.

The volatile flag only needs to go in the statcache, not the main metadata
log, but for the moment it is going in both.


No differences found