[OpenAFS-devel] Patch to implement default tuning proposal
discussed a while ago
Jeffrey Hutzelman
jhutz@cmu.edu
Wed, 17 Aug 2005 18:15:02 -0400
On Wednesday, August 17, 2005 05:20:27 PM -0400 Jim Rees <rees@umich.edu>
wrote:
> Ok, here's a possible problem:
>
> afsd.c:1143 int maxDir = (cacheFiles + nFilesPerDir - 1) / nFilesPerDir;
>
> Won't maxDir be too small if we're shrinking the cache and we're going to
> remove some directories? Won't this make us scribble past the end of
> cache_dir_filelist and cache_dir_list?
No, I don't think so. Those arrays are referenced only with directory
numbers that are in range. It seems to deal correctly with changes in both
the number of directories and in the number of files.