]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DAFS: Clear salvage stats on VOL_DONE
authorAndrew Deason <adeason@sinenomine.net>
Wed, 2 Mar 2011 21:39:51 +0000 (15:39 -0600)
committerDerrick Brashear <shadow@dementia.org>
Tue, 8 Mar 2011 12:15:43 +0000 (04:15 -0800)
When we VOL_DONE a volume, the volume has been deleted, so the salvage
stats/information are no longer relevant. Clear them out, so we don't
think the volume is still salvaging.

Reviewed-on: http://gerrit.openafs.org/4120
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 40049c56791f3488640ae65c5dc5c4d6503375bd)

Change-Id: I1c7f61994b050de7bd8c0e7fc39df978a31530a6
Reviewed-on: http://gerrit.openafs.org/4166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/vol/fssync-server.c

index 08774e8610062566daecd6efc25ea5bce92bedcb..fc2585db82e685edd653d399a49daa1b2a425adf 100644 (file)
@@ -1226,6 +1226,9 @@ FSYNC_com_VolDone(FSSYNC_VolOp_command * vcom, SYNC_response * res)
                VChangeState_r(vp, VOL_STATE_DELETED);
                VDeregisterVolOp_r(vp);
 
+               /* Volume is gone; clear out old salvage stats */
+               memset(&vp->salvage, 0, sizeof(vp->salvage));
+
                /* Someday we should free the vp, too, after about 2 hours,
                 * possibly by putting the vp back on the VLRU. */