]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
libafs: rename volume accessTime to setupTime
authorMichael Meffie <mmeffie@sinenomine.net>
Thu, 11 Jun 2015 15:02:20 +0000 (11:02 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Wed, 6 Jul 2016 04:10:02 +0000 (00:10 -0400)
Since OpenAFS 1.0, the struct volume accessTime member has been the time
time the volume structure is setup, not the last time the volume was
used (as indicated by the comments).  This time stamp is only used to
find the oldest available volume slot in the disked backed volume cache.
(Perhaps in pre-OpenAFS this was updated each time the volume was
referenced.)

Rename this structure member and update the comments for it.

Change-Id: I33a6371e8800b2d0f7b2700db0785fc365a8649e
Reviewed-on: https://gerrit.openafs.org/11896
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs.h
src/afs/afs_volume.c
src/venus/kdump.c

index f470947e1ebe02734a7148b1f7ecfcf58903d2b3..bf2273dc91f78bab420821647562e2ad65752354 100644 (file)
@@ -603,7 +603,7 @@ struct volume {
     afs_int32 roVol;
     afs_int32 backVol;
     afs_int32 rwVol;           /* For r/o vols, original read/write volume. */
-    afs_int32 accessTime;      /* last time we used it */
+    afs_int32 setupTime;       /* time volume was setup from vldb info */
     afs_int32 vtix;            /* volume table index */
     afs_int32 copyDate;                /* copyDate field, for tracking vol releases */
     afs_int32 expireTime;      /* for per-volume callbacks... */
index 3aa64b8370d4bdc0367cc8d26ed189369ab1abd3..0dcab6b5934b5e68e637282cc5ae876511280a4c 100644 (file)
@@ -166,8 +166,8 @@ afs_UFSGetVolSlot(afs_int32 volid, struct cell *tcell)
            lv = &afs_volumes[i];
            for (tv = *lv; tv; lv = &tv->next, tv = *lv) {
                if (tv->refCount == 0) {        /* is this one available? */
-                   if (tv->accessTime < bestTime) {    /* best one available? */
-                       bestTime = tv->accessTime;
+                   if (tv->setupTime < bestTime) {     /* best one available? */
+                       bestTime = tv->setupTime;
                        bestLp = lv;
                        bestVp = tv;
                    }
@@ -373,7 +373,7 @@ afs_SetupVolSlot(afs_int32 volid, struct cell *tcell)
     }
     tv->refCount++;
     tv->states &= ~VRecheck;   /* just checked it */
-    tv->accessTime = osi_Time();
+    tv->setupTime = osi_Time();
     ReleaseWriteLock(&afs_xvolume);
     return tv;
 }
index aaa39635617c15c333d3c334c25dcb1805fed522..4ed65c4d0a23384b1d404f8f6a36f576f38ce9ca 100644 (file)
@@ -2656,13 +2656,13 @@ print_volume(int kmem, struct volume *vep, struct volume *ptr, int pnt)
           vep->backVol);
 #ifdef AFS33
     printf
-       ("\trwVol=%d, AcTime=%d, copyDate=%d, expTime=%d, vtix=%d, refC=%d, states=%x\n",
-        vep->rwVol, vep->accessTime, vep->copyDate, vep->expireTime,
+       ("\trwVol=%d, setupTime=%d, copyDate=%d, expTime=%d, vtix=%d, refC=%d, states=%x\n",
+        vep->rwVol, vep->setupTime, vep->copyDate, vep->expireTime,
         vep->vtix, vep->refCount, vep->states);
 #else
     printf
-       ("\trwVol=%d, AcTime=%d, copyDate=%d, vtix=%d, refC=%d, states=%x\n",
-        vep->rwVol, vep->accessTime, vep->copyDate, vep->vtix, vep->refCount,
+       ("\trwVol=%d, setupTime=%d, copyDate=%d, vtix=%d, refC=%d, states=%x\n",
+        vep->rwVol, vep->setupTime, vep->copyDate, vep->vtix, vep->refCount,
         vep->states);
 #endif
     printf("\tVolume's statuses: ");