]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afs: Add some comments explaining 'needvalid'
authorAndrew Deason <adeason@sinenomine.net>
Mon, 21 May 2012 17:28:58 +0000 (12:28 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 14 Aug 2012 20:26:49 +0000 (13:26 -0700)
Add some comments to try and help explain the meaning of the
'needvalid' parameter to GetDSlot, added in
1a672914ab050811c99b6307c657630ab9b5c8ee.

Reviewed-on: http://gerrit.openafs.org/7429
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 6f6c799c4ba4d03c6c381738b2db8aafe741ba5e)

Change-Id: If7d37d427f96f3607b6c3aea2487396666e41a03
Reviewed-on: http://gerrit.openafs.org/7943
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_dcache.c

index 3d06a5897d76d2910ec13a88c0574666f4ad6271..b2f2c63cecbb72765bc35f943e9b2b879bbe8232 100644 (file)
@@ -2571,6 +2571,7 @@ afs_WriteThroughDSlots(void)
  *
  * Parameters:
  *     aslot : Dcache slot to look at.
+ *      needvalid : Whether the specified slot should already exist
  *
  * Environment:
  *     Must be called with afs_xdcache write-locked.
@@ -2598,6 +2599,9 @@ afs_MemGetDSlot(afs_int32 aslot, int needvalid)
        return tdc;
     }
 
+    /* if 'needvalid' is true, the slot must already exist and be populated
+     * somewhere. for memcache, the only place that dcache entries exist is
+     * in memory, so if we did not find it above, something is very wrong. */
     osi_Assert(!needvalid);
 
     if (!afs_freeDSList)
@@ -2659,6 +2663,7 @@ unsigned int last_error = 0, lasterrtime = 0;
  *
  * Parameters:
  *     aslot : Dcache slot to look at.
+ *      needvalid : Whether the specified slot should already exist
  *
  * Environment:
  *     afs_xdcache lock write-locked.