Date: Fri, 28 Sep 2001 10:47:30 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Douglas Swarin <doug@staff.texas.net> Cc: hackers@freebsd.org, tmoestl@gmx.net, bp@freebsd.org Subject: Re: more on Re: Please review: bugfix for vinvalbuf() Message-ID: <200109281747.f8SHlUP29063@earth.backplane.com> References: <20010711003926.B8799@crow.dom2ip.de> <200107110643.f6B6hTB24707@earth.backplane.com> <20010926204333.A15865@staff.texas.net>
next in thread | previous in thread | raw e-mail | index | archive | help
:@@ -721,9 +721,9 @@ : } : } : :- while (vp->v_numoutput > 0) { :- vp->v_flag |= VBWAIT; :- tsleep(&vp->v_numoutput, PVM, "vnvlbv", 0); :+ if (VOP_GETVOBJECT(vp, &object) == 0) { :+ while (object->paging_in_progress) :+ vm_object_pip_sleep(object, "vnvlbv"); : } : : splx(s); Hey Douglas, try the patch fragment below and see if you can reproduce the problem. -Matt @@ -721,10 +746,21 @@ } } - while (vp->v_numoutput > 0) { - vp->v_flag |= VBWAIT; - tsleep(&vp->v_numoutput, PVM, "vnvlbv", 0); - } + /* + * Wait for I/O to complete. XXX needs cleaning up. The vnode can + * have write I/O in-progress but if there is a VM object then the + * VM object can also have read-I/O in-progress. + */ + do { + while (vp->v_numoutput > 0) { + vp->v_flag |= VBWAIT; + tsleep(&vp->v_numoutput, PVM, "vnvlbv", 0); + } + if (VOP_GETVOBJECT(vp, &object) == 0) { + while (object->paging_in_progress) + vm_object_pip_sleep(object, "vnvlbx"); + } + } while (vp->v_numoutput > 0); splx(s); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109281747.f8SHlUP29063>