Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pbulk hang in 5.99.21
> On Sun, Nov 08, 2009 at 11:38:15AM +0100, Thomas Klausner wrote:
> > I've just upgraded my 5.99.21 from Oct 22 to Nov 8 (kernel and
> > userland, packages not rebuilt), and now a pbulk (set up in a tmpfs)
> > hangs during the scan phase. Output including some ctrl-t:
>
> Still happens with today's 5.99.22.
Here is a workaround I'm trying now.
enami.
Index: sys/kern/vfs_subr.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_subr.c,v
retrieving revision 1.386
diff -u -r1.386 vfs_subr.c
--- sys/kern/vfs_subr.c 5 Nov 2009 08:18:02 -0000 1.386
+++ sys/kern/vfs_subr.c 11 Nov 2009 06:02:33 -0000
@@ -1386,7 +1386,7 @@
vrelel(vnode_t *vp, int flags)
{
bool recycle, defer;
- int error;
+ int error, islayer_vnode;
KASSERT(mutex_owned(&vp->v_interlock));
KASSERT((vp->v_iflag & VI_MARKER) == 0);
@@ -1425,6 +1425,7 @@
* XXX This ugly block can be largely eliminated if
* locking is pushed down into the file systems.
*/
+ islayer_vnode = (vp->v_iflag & VI_LAYER) != 0;
if (curlwp == uvm.pagedaemon_lwp) {
/* The pagedaemon can't wait around; defer. */
defer = true;
@@ -1432,13 +1433,18 @@
/* We have to try harder. */
vp->v_iflag &= ~VI_INACTREDO;
error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK |
- LK_RETRY);
+ (islayer_vnode ? LK_NOWAIT : LK_RETRY));
if (error != 0) {
- /* XXX */
- vpanic(vp, "vrele: unable to lock %p");
- }
- defer = false;
- } else if ((vp->v_iflag & VI_LAYER) != 0) {
+ if (islayer_vnode) {
+ defer = true;
+ mutex_enter(&vp->v_interlock);
+ } else {
+ /* XXX */
+ vpanic(vp, "vrele: unable to lock %p");
+ }
+ } else
+ defer = false;
+ } else if (islayer_vnode) {
/*
* Acquiring the stack's lock in vclean() even
* for an honest vput/vrele is dangerous because
Home |
Main Index |
Thread Index |
Old Index