[OpenAFS-devel] Large Caches: Implementation Discussion

Jim Rees rees@umich.edu
Mon, 23 Jul 2001 12:24:29 -0400


  One thing that I haven't had a chance to think about (until now)...
  I'm not sure how the CacheItems file keeps track of what is contained
  in each cache file.  However, I have a feeling that if someone changes
  the number of files per subdirectory, the entries in the CacheItems
  file may become invalid.

The cache manager knows nothing of file names, only inode numbers.

Here is the case I would worry about.  Number of cache files stays about the
same, but files per dir changes.  When afsd does its sweep, it will remove
some files in some dir, then create files in a different dir.  The new file
may have the same inode number as the old file, but it has effectively been
truncated.

I seem to remember that afsd tells the cache manager when a file is newly
created, but someone should check the code.