From: Andrew Deason Date: Fri, 1 Jul 2011 19:25:05 +0000 (-0500) Subject: DAFS: Do not clear salv state on fssync salvage X-Git-Tag: upstream/1.8.0_pre1^2~3588 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1ecac71e50e75ce5a45e297d57c480e850975af7;p=packages%2Fo%2Fopenafs.git DAFS: Do not clear salv state on fssync salvage When a volume is put into an error state via the FSYNC_VOL_FORCE_ERROR command, we clear the salvage state informaton on it, since we're forcing it offline and thus inaccessible. However, if we are forcing it to an error state because the volume needs salvaging, we just salvage it. In this case, do not clear the salvage state, since we need to know if we've already requested or scheduled a salvage so we can correctly keep track of the number of salvages performed. Change-Id: Ic4efd7a78bfb1b99a5308f0c67e81f4779dfe545 Reviewed-on: http://gerrit.openafs.org/4900 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/vol/fssync-server.c b/src/vol/fssync-server.c index 0f3f70eb7..3e356cb2d 100644 --- a/src/vol/fssync-server.c +++ b/src/vol/fssync-server.c @@ -1330,9 +1330,6 @@ FSYNC_com_VolError(FSSYNC_VolOp_command * vcom, SYNC_response * res) if (vp) { if (FSYNC_partMatch(vcom, vp, 0)) { - /* null out salvsync control state, as it's no longer relevant */ - memset(&vp->salvage, 0, sizeof(vp->salvage)); - VCreateReservation_r(vp); VWaitExclusiveState_r(vp); VDeregisterVolOp_r(vp); @@ -1340,6 +1337,8 @@ FSYNC_com_VolError(FSSYNC_VolOp_command * vcom, SYNC_response * res) if (vcom->hdr->reason == FSYNC_SALVAGE) { FSYNC_backgroundSalvage(vp); } else { + /* null out salvsync control state, as it's no longer relevant */ + memset(&vp->salvage, 0, sizeof(vp->salvage)); VChangeState_r(vp, VOL_STATE_ERROR); }