volser: Preserve needsSalvaged during restore
authorAndrew Deason <adeason@sinenomine.net>
Wed, 9 Nov 2011 23:04:09 +0000 (17:04 -0600)
committerDerrick Brashear <shadow@dementix.org>
Thu, 10 Nov 2011 03:19:25 +0000 (19:19 -0800)
commit9ba891676a15512fa58915662cf599ea73eac430
treef747838f1ef0540b416b56824abd40913196af41
parenta1669f3e37299c11bf29a458212e03d1bdb22334
volser: Preserve needsSalvaged during restore

Some of the routines during a volume restore may set needsSalvaged, if
an inconsistency is detected while writing the given volume data.
However, after the data is read, we set the volume header information
to what was found in the dump stream, ignoring any needsSalvaged that
may have been set.

To ensure that inconsistent volumes in this situation actually get
demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of
needsSalvaged in the header, if it was set.

Change-Id: I575d14d84120be0fbbeb185ed2726f1285e6f2ce
Reviewed-on: http://gerrit.openafs.org/5822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/volser/dumpstuff.c