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>
Fri, 4 Mar 2011 15:36:19 +0000 (07:36 -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.

Change-Id: I5dbde1609ba7659203fb1904571871d6ffc66539
Reviewed-on: http://gerrit.openafs.org/4120
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/vol/fssync-server.c

index 8e2c088..05268a6 100644 (file)
@@ -1227,6 +1227,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. */