vol-salvage: Only delete bad vnodes during !check
authorAndrew Deason <adeason@sinenomine.net>
Tue, 25 Jan 2011 16:46:38 +0000 (10:46 -0600)
committerDerrick Brashear <shadow@dementia.org>
Tue, 25 Jan 2011 20:07:00 +0000 (12:07 -0800)
commit5817a13b84496c087b350be50c17a8b0f9aac9d5
tree3b1a23b1049277bf58d422e63701b4173674e43d
parent14f5466eeea8cc088d64c6f270c05be457a01cfe
vol-salvage: Only delete bad vnodes during !check

In SalvageIndex, if check is true, we're only supposed to check for
consistency and not actually change anything (this is enforced by an
assert later on). The check for vnode magic consistency breaks this
assumption, and just always fixes the vnode.

Change this so we just error out if check is set, and the vnode magic
is wrong.

Change-Id: I9e2d3bd5e9e340a9b2ac66d70d52aa110b512561
Reviewed-on: http://gerrit.openafs.org/3756
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/vol-salvage.c