[1725] in NetBSD-Development
err.. does this go here?
daemon@ATHENA.MIT.EDU (Yoav Yerushalmi)
Thu Jul 9 03:02:04 1998
To: netbsd-afs@MIT.EDU
Date: Thu, 09 Jul 1998 03:01:45 EDT
From: Yoav Yerushalmi <yoav@MIT.EDU>
So, I'm not sure if this is the right list to send it to, so if it's
the wrong one, please advise (and forward to the right place).
I failed to load libafs.o after building a new 1.3F kernel (while
the old one worked fine). After some searching, I actually discovered
that this was because I decided to punt on
option DIAGNOSTIC
further searching revealed that vref is only defined if you have
DIAGNOSTICs enabled. the following patch should undo this need
(I basically ripped the vref code out of the kernel and made the
afs code more similar to it). I'm using it right now and it seems
to work, but I didn't put it in the real source tree, because, well
I don't know if I'm supposed to (sigh, getting those hundreds of megs
to a machine without AFS was not fun).
patch involved modifying
src/sipb-3.3/src/afs/afs_nbsd_subr.c
*** afs_nbsd_subr.c.old Thu Jul 9 02:32:31 1998
--- afs_nbsd_subr.c Thu Jul 9 02:53:40 1998
***************
*** 371,381 ****
afs_nbsd_ref(vp)
struct vnode *vp;
{
! if (vp->v_usecount == 0) {
vprint("holding unheld node", vp);
panic("afs_nbsd_ref");
}
! VREF(vp);
}
void
--- 371,383 ----
afs_nbsd_ref(vp)
struct vnode *vp;
{
! if (vp->v_usecount <= 0) {
vprint("holding unheld node", vp);
panic("afs_nbsd_ref");
}
! simple_lock(&vp->v_interlock);
! vp->v_usecount++;
! simple_unlock(&vp->v_interlock);
}
void
------------------------------------------------------------
| Yoav Yerushalmi | My opinions are mine.. |
| M.I.T student at large | (I hope.. don't sue) |
| http://www.mit.edu/people/yoav/homepage.html |
------------------------------------------------------------