[OpenAFS-devel] Large Caches: Implementation Discussion

Derek Atkins warlord@MIT.EDU
23 Jul 2001 13:02:09 -0400


No, that's not the issue.

The cache manager numbers each file, and then passes down the inode
number for each cache file.  In the past, cache file number X would
_always_ be cache file number X, so every cache sweep it will be in
the same place in the list.  However, now, Cache file Dn/Vm is now
n*files_per_subdir+m, which is no longer a constant.  That means that
it could be a DIFFERENT place in the list if the number of
files_per_subdir changes.

There is nothing that says that a file is newly created, AFAICT.

-derek

Jim Rees <rees@umich.edu> writes:

>   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.
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord@MIT.EDU                        PGP key available