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.6.0.pre7^2~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=9a2890c4a4b3bf359bd759ef26139d20045b87eb;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. Reviewed-on: http://gerrit.openafs.org/4900 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1ecac71e50e75ce5a45e297d57c480e850975af7) Change-Id: I313f4c4093f3b4f5ee501ef7537d05b557946a70 Reviewed-on: http://gerrit.openafs.org/4948 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/vol/fssync-server.c b/src/vol/fssync-server.c index ba602ffc9..f456afd02 100644 --- a/src/vol/fssync-server.c +++ b/src/vol/fssync-server.c @@ -1339,9 +1339,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); @@ -1349,6 +1346,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); }