From owner-freebsd-hackers Fri Sep 28 10:47:38 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id DC95537B406; Fri, 28 Sep 2001 10:47:35 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f8SHlUP29063; Fri, 28 Sep 2001 10:47:30 -0700 (PDT) (envelope-from dillon) Date: Fri, 28 Sep 2001 10:47:30 -0700 (PDT) From: Matt Dillon Message-Id: <200109281747.f8SHlUP29063@earth.backplane.com> To: Douglas Swarin Cc: hackers@freebsd.org, tmoestl@gmx.net, bp@freebsd.org Subject: Re: more on Re: Please review: bugfix for vinvalbuf() References: <20010711003926.B8799@crow.dom2ip.de> <200107110643.f6B6hTB24707@earth.backplane.com> <20010926204333.A15865@staff.texas.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :@@ -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