[OpenAFS-devel] Patch to implement default tuning proposal discussed a while ago

Derek Atkins warlord@MIT.EDU
Thu, 18 Aug 2005 07:58:14 -0400


Jeffrey Hutzelman <jhutz@cmu.edu> writes:

> 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.

I certainly tested the code going in both directions when I originally
wrote it...

-derek

-- 
       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