[OpenAFS-devel] sanity check: client vldb cache time

Jeffrey Hutzelman jhutz@cmu.edu
Wed, 22 Jan 2014 15:27:00 -0500


On Wed, 2014-01-22 at 11:59 -0600, Andrew Deason wrote:
Recently, I've had reason to go looking around this area of code (that
> Nicolas Prochazka thread on -info had me curious at first, but some
> unrelated questions came up later that I needed to look into). As far as
> I can tell, that answer of "2 hours" is not correct (or at best, a great
> and possibly misleading oversimplification).

It's an oversimplification.  Every 10 minutes, we call
afs_CheckVolumeNames() which, among other things, resets any expired
volcache entries for RO volumes.  Additionally, mount points leading to
these volumes are invalidated (so they will need to be reevaluated the
next time the are traversed), and any vcaches in these volumes are
marked not statd.

Any time the fileserver grants a callback on a vnode, the expiration
time on the corresponding volcache entry is extended to match the
callback (if it is not already later).  So, as long as you are using a
volume successfully, its volcache entry does not expire.

Additionally, every 12 times the 10-minute check runs (i.e. every 2
hours), all mount points are invalidated, so that they must be
reevaluated the next time they are traversed.  This means that except
for RO volumes, name->id mappings are reevaluated at most once every 2
hours.  Expiration of the volcache entry for an RW volume will cause us
to check with the VLDB to see where that volume is located, but won't
cause the mountpoint to be reparsed and the name->id mapping to be
updated.


-- Jeff