[OpenAFS-devel] AFS dcache problem

fabv fabv@freegates.be
Tue, 22 Jan 2002 10:45:12 +0100


Hi,

I'm new to AFS, and I have got a problem.  Maybe is it the normal AFS 
behaviour, but I'm not sure.

I use AFS (1.2.2a) on linux 2.4.16 with a dcache of 700Mb.  There is no 
write accesses : volumes are replicated ro and all files are 
"system:anyuser rl", so nobody needs to authenticate to access the files.

It works well except the dcache is not fully persistent across reboots. 
The file are written in the disk cache when they are accessed (I can see 
that the cache size increase with df or du (cache has its own 
partition)).  When I stop AFS, they are still there.  But when I restart 
AFS, it does its cache scan and 'discard' most of the files.  (the space 
used on the cache partition decrease and when I try to read the files, 
they are loaded through the network)  In fact, it discard about the 
_last_ 30-50 Mb cached.

I have tried to see what was going on and I have found the code in 
afs_dcache.c that was responsible of the cache check 
(afs_InitCacheFile(afile, ainode)).  It appeared that was the checks 
about tdc->f.modTime and tstat.mtime who discarded my files, so I 
removed them (just for a try).  It was better but some files were still 
deleted because of (tdc->f.fid.Fid.Volume == 0).  However if I remove 
this check none of the chunks are discarded and AFS says my cache is 
full. Thus, my theory is that these checks are not faulty but there is a 
problem at shutdown.  Maybe something is not written correctly about the 
last files that where cached.


Thanks for your help,

Fabrice.