From 71c84e7453c24cb5c9b1d46462dd6253f1999654 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 27 Aug 2009 12:43:03 -0500 Subject: [PATCH] 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 --- src/afs/afs_init.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.39.5