]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Update accessDate on volume access
authorAndrew Deason <adeason@sinenomine.net>
Thu, 3 Sep 2009 19:43:28 +0000 (14:43 -0500)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 3 Sep 2009 19:59:12 +0000 (12:59 -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>
(cherry picked from commit 5d9c767ac55b2d1b8f5b87dc9ced63e282af7bac)
Reviewed-on: http://gerrit.openafs.org/398

src/vol/volume.c

index d305b06c39dc474b11c88ebba8f6fce5cd96ccc0..717524b9af1423d5c683c80164e0f8ea043c1b00 100644 (file)
@@ -1792,6 +1792,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);
     /*