[1290] in NetBSD-Development

home help back first fref pref prev next nref lref last post

two questions

daemon@ATHENA.MIT.EDU (Jim Rees)
Thu Apr 4 11:10:00 1996

Resent-From: John Kohl <jtk@atria.com>
Resent-To: netbsd-afs@MIT.EDU
From: Jim Rees <rees@umich.edu>
To: John Kohl <jtk@atria.com>
Cc: Bill Sommerfeld <sommerfeld@apollo.hp.com>
Date: Wed, 03 Apr 1996 20:03:21 -0500

Shouldn't afs_nbsd_reclaim() acquire the afs_xvcache lock before calling
afs_FlushVCache?  Although I wouldn't be surprised to see deadlock if we
tried this.

Also, in afs_NewVCache, suppose there are no vcaches on the free list and we
must get one off the LRU queue.  Since it's not on the free list, it
probably has a vnode attached to it.  But now we call afs_FlushVCache, which
cleans the vnode.  Later, getnewvnode will come along, try to clean the
already cleaned vnode, and we'll fault in nbsd_lock trying to access a
vcache through a null pointer.

You'll never see this as long as your vcache pool is bigger than your vnode
pool, because they'll always be reclaimed before this happens.  But if you
run afsd with e.g. -stat 100, I think you'll see what I mean (although I've
only tried it with the disconnected afs).


home help back first fref pref prev next nref lref last post