From: Andrew Deason Date: Thu, 27 Aug 2009 17:43:03 +0000 (-0500) Subject: Fix cache tracking for small fragsizes X-Git-Tag: openafs-stable-1_4_12pre1~40 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=71c84e7453c24cb5c9b1d46462dd6253f1999654;p=packages%2Fo%2Fopenafs.git Fix cache tracking for small fragsizes The tracked amount of disk cache used by a client can be incorrect when afs_fsfragsize is tuned to below 1023. Since we round up to the next nearest afs_fsfragsize+1 then round down to the kb, if afs_fsfragsize+1 < 1kb, we can undershoot the cache usage. This enforces afs_fsfragsize to always be at least 1023. Change-Id: I2f2f0b14da3f1a57348497f0a372c89388818e9c Reviewed-on: http://gerrit.openafs.org/338 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/960 --- diff --git a/src/afs/afs_init.c b/src/afs/afs_init.c index 970c1a8db..728bea658 100644 --- a/src/afs/afs_init.c +++ b/src/afs/afs_init.c @@ -468,6 +468,8 @@ afs_InitCacheInfo(register char *afile) #endif /* AFS_LINUX20_ENV */ AFS_RELE(filevp); #endif /* AFS_LINUX22_ENV */ + if (afs_fsfragsize < 1023) + afs_fsfragsize = 1023; tfile = osi_UFSOpen(cacheInode); afs_osi_Stat(tfile, &tstat); cacheInfoModTime = tstat.mtime;