Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2002 06:28:01 -0500
From:      "David E. Cross" <crossd@cs.rpi.edu>
To:        freebsd-fs@freebsd.org
Subject:   openafs question
Message-ID:  <200211281128.gASBS2g04424@monica.cs.rpi.edu>

next in thread | raw e-mail | index | archive | help
I've been working on the FreeBSD-OpenAFS port, and I seem to be down to
one last bug; I know what it is, I am just having trouble getting the 
solution to it.

First a quick description of what the code is doing... It maintains its 
own set of vnodes, outside of the system pool, which it populates with
data (these are NEVER gotten with getnewvnode(9)).  The problem arises 
when one of these is used, and then free'd.  The system decides to insert
it into the global vnode cache and use it for things like UFS.  This is
bad for 2 reasons:

1) the per-mount-point TAILQ of vnodes is not properly initialized in the
   AFS routines.  tqe_next=0x0; tqe_prev=0xdeadb; Thus when the system
   vnode routines try to work with this *boom*.

2) Surely you say that just fixing tqe_next/prev will fix it.  well, sorta.
   Since it has its own list, referenced "its own way", it feels free to use
   these however it wants.

My question is:  Can I somehow keep the system from getting the idea that it
should use these?  The existing code artificially increases the usecount by
one to prevent it from ever being reaped, the downside of this is that files
are never closed, and you quickly panic afs when it goes beyond its "-stat"
parameter.  There is prior art in the AFS code for using system vnodes, but
only the OSF code uses this, and there are other problems (like it uses
newvnode to get a vnode, but it assigns it to a "struct vcache", which is 
an afs datatype that has a struct vnode within it; our getnewvnode would
appear inadequate for this task, it also means a lot more "work" (without 
explaining the code too much, just trust me on this -- perhaps some magic
with v_data could be worked out, but I'd like to follow the above through
first, note that no other OS, including Darwin appears to have the above
mentioned problem of the kernel-propper taking AFS vnodes)

-- 
David Cross                               | email: crossd@cs.rpi.edu 
Lab Director                              | Rm: 308 Lally Hall
Rensselaer Polytechnic Institute,         | Ph: 518.276.2860            
Department of Computer Science            | Fax: 518.276.4033
I speak only for myself.                  | WinNT:Linux::Linux:FreeBSD

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211281128.gASBS2g04424>