tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NFS panic



On Thu, Oct 25, 2012 at 09:55:23PM +0200, J. Hannken-Illjes wrote:
> > [...]
> > I think we should check for VI_XLOCK in addition to VI_CLEAN at the end of
> > vn_lock(). What do you think ?
> 
> Looks good to me (check VI_XLOCK and vwait(vp, VI_XLOCK)).

I've been using the attached patch (but I'm not sure the problem showed
up again, the server has run for weeks before hitting it).
Is the vwait() mandatory here ? To me it looks like the way things gets
locked, the same vnode won't be returned again anyway ...

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: vfs_vnops.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_vnops.c,v
retrieving revision 1.183.8.1
diff -u -r1.183.8.1 vfs_vnops.c
--- vfs_vnops.c 12 Apr 2012 17:15:23 -0000      1.183.8.1
+++ vfs_vnops.c 7 Nov 2012 11:24:58 -0000
@@ -807,7 +807,7 @@
                        error = VOP_LOCK(vp, (flags & ~LK_RETRY));
                        if (error == 0 && (flags & LK_RETRY) == 0) {
                                mutex_enter(vp->v_interlock);
-                               if ((vp->v_iflag & VI_CLEAN)) {
+                               if ((vp->v_iflag & (VI_CLEAN|VI_XLOCK))) {
                                        mutex_exit(vp->v_interlock);
                                        VOP_UNLOCK(vp);
                                        return ENOENT;


Home | Main Index | Thread Index | Old Index