OpenAFS Master Repository branch, master, updated. BP-openafs-stable-1_8_x-236-g8375a7f
Gerrit Code Review
gerrit@openafs.org
Fri, 21 Sep 2018 08:08:09 -0400
The following commit has been merged in the master branch:
commit 8375a7f7dd0e3bcbf928a23f874d1a15a952cdef
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Sat Aug 11 14:00:18 2018 -0400
volser: warn if older version of volume is restored
Volume restores work by overwriting vnodes with the data in the given
volume dump. If we restore a partial incremental dump from an older
version of the volume, this generally results in a partly-corrupted
volume, since directory vnodes may contain references that don't exist
in the current version of the volume (or are supposed to be in a
different directory).
Currently, the volserver does not prevent restoring older volume data
to a volume, and this doesn't necessarily always result in corrupted
data (for instance, if we are restoring a full volume dump over an
existing volume). But restoring old volume data seems more likely to
be a mistake, since reverting a volume back to an old version, even
without corrupting data, is a strange thing to do and may cause
problems with our methods of cache consistency.
So, log a warning when this happens, so if this is a mistake, it
doesn't happen silently. But we still do not prevent this action, since
it's possible something could be doing this intentionally. We detect
this just by checking if the updateDate in the given header is older
than the current updateDate for the volume on disk.
Note: Restoring a full dump file (-overwrite f) will not result in
corrupted data. In this scenario, the restore operation removes the
volume on disk first (if present). After that, the dump file is
restored. In this case, we do not log anything (the volume is not
corrupted).
Change-Id: Iac55cc8bb1406ca6af9a5e43e7d37c6bfa889e91
Reviewed-on: https://gerrit.openafs.org/13251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/volser/dumpstuff.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
--
OpenAFS Master Repository