]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Update accessDate on volume access
authorAndrew Deason <adeason@sinenomine.net>
Mon, 31 Aug 2009 16:10:10 +0000 (11:10 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 3 Sep 2009 19:35:53 +0000 (12:35 -0700)
Right now accessDate is simply never updated, so the last access time
for a volume is never reported. Simply update the field in
VBumpVolumeUsage_r, so we track the last time the volume was accessed.

Note that this does not increase disk writes to the volume header; the
performance impact is effectively nil.

Reviewed-on: http://gerrit.openafs.org/385
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/vol/volume.c

index b440e9f7fc66d5c8007c951b16e8c0a591963e61..816799e63cee60c3595cf1d3d1cab0285cb5c284 100644 (file)
@@ -5018,6 +5018,7 @@ void
 VBumpVolumeUsage_r(register Volume * vp)
 {
     unsigned int now = FT_ApproxTime();
+    V_accessDate(vp) = now;
     if (now - V_dayUseDate(vp) > OneDay)
        VAdjustVolumeStatistics_r(vp);
     /*