[OpenAFS-devel] casts vnode<->vcache
Chaskiel M Grundman
cg2v@andrew.cmu.edu
Fri, 22 Mar 2002 19:58:16 -0500
--On Friday, March 22, 2002 19:15:56 +0100 Johan Danielsson
<joda+openafs@pdc.kth.se> wrote:
> Currently the code does (struct vcache*)vnode all over the place,
> which is fine for systems that either have variable size vnodes, or
> have a large enough vnode to hold a whole vcache. This does not
> include BSD:s.
You're a little confused.
It also works in cases where the pointer points at a struct vcache sized
piece of memory, instead of a struct vnode sized chunk acquired from
getnewvnode(), whis is what afs does on all the platforms except
OSF/DUX/Tru64. Note that a struct vcache is defined as follows:
struct vcache {
struct vnode v; /* Has reference count in v.v_count
*/
struct afs_q vlruq; /* lru q next and prev */
[...more..]
> I'd like to propose a change that replaces all casts with macros that
> does:
This change isn't necessarily bad, but fixing the big issue is more
complicated than getting rid of the casts.
> The afs/NBSD catalog is also untouched by this patch, but it needs
> more serious help anyway.
Assuming the CVS head is otherwise stable, it should actually work on
freebsd. I never got my sparc64 machine working well under netbsd, so I
never got around to fixing up that port...