[PATCH] Fix 'implicit declaration' warning and update vgone(9)

Robert Watson rwatson at FreeBSD.org
Fri Oct 29 16:58:08 UTC 2010


On Wed, 27 Oct 2010, Benjamin Kaduk wrote:

> On Wed, 27 Oct 2010, Kostik Belousov wrote:
>
>> On Wed, Oct 27, 2010 at 10:59:56AM -0400, Benjamin Kaduk wrote:
>>> [1] The old (racy) function is osi_TryEvictVCache, here: 
>>> http://git.openafs.org/?p=openafs.git;a=blob;f=src/afs/FBSD/osi_vcache.c;h=c2060c74f0155a610d2ea94f3c7f508e8ca4373a;hb=HEAD
>> The function looks very strange for much more serious reasons. Why do you 
>> try to manage the vnode revocation in the filesystem module at all ?
>
> I am still becoming familiar with the AFS code, but I think this is largely 
> due to a difference in the vfs structure that AFS has been using and the 
> FreeBSD standard.  E.g. vop_inactive/vop_reclaim do not actually free 
> filesystem-specific resources, instead keeping a free list of "vcache" 
> entries.  So, the original authors of this AFS code were approaching the 
> problem in a somewhat different way. Therefore, are somewhat-orthogonal 
> pools of vcaches and vnodes (with some intersection).  If the vcaches are 
> all in use in use, there is a routine which tries to "shake some loose"; if 
> it can free up vcaches, their associated vnodes also need to be cleaned up 
> in some fashion.  It may be that no additional code is actually needed to do 
> this, though -- I am not sure.

I have a hazy recollection, from quite a long time ago, that OpenAFS used to 
be a bit special with regard to vnodes -- allocating its own, or something 
along those lines.  I expect it no longer does that, but it could be that it 
feels it "owns" the vnodes more than your average file system does, which may 
play less well with global management of vnodes.  Derrick would probably have 
more to say on this.

Robert


More information about the freebsd-hackers mailing list