]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DAFS: Do not clear salv state on fssync salvage
authorAndrew Deason <adeason@sinenomine.net>
Fri, 1 Jul 2011 19:25:05 +0000 (14:25 -0500)
committerDerrick Brashear <shadow@dementia.org>
Sat, 9 Jul 2011 05:08:23 +0000 (22:08 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1ecac71e50e75ce5a45e297d57c480e850975af7)

Change-Id: I313f4c4093f3b4f5ee501ef7537d05b557946a70
Reviewed-on: http://gerrit.openafs.org/4948
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/fssync-server.c

index ba602ffc96f18a5c76f7b7a415f2d69cc311356d..f456afd022ccb016a000066e4ad92572fe65bcba 100644 (file)
@@ -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);
             }