From owner-freebsd-current Wed Nov 27 2:10:10 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0149D37B401 for ; Wed, 27 Nov 2002 02:10:10 -0800 (PST) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id B7FE143E9C for ; Wed, 27 Nov 2002 02:10:08 -0800 (PST) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 27 Nov 2002 10:10:07 +0000 (GMT) To: Bruce Evans Cc: Hiten Pandya , "Vladimir B. Grebenschikov" , "current@freebsd.org" Subject: Re: MD broken in current In-Reply-To: Your message of "Wed, 27 Nov 2002 18:17:41 +1100." <20021127181557.V6874-100000@gamplex.bde.org> Date: Wed, 27 Nov 2002 10:10:03 +0000 From: Ian Dowse Message-ID: <200211271010.aa45800@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20021127181557.V6874-100000@gamplex.bde.org>, Bruce Evans writes: >Better fix mddestroy(). I don't know why it hangs ... I guess it is >because it is called before initialization is completed in mdinit(), >and there aren't enough state checks in mddestroy(). I think moving the line tsleep(sc, PRIBIO, "mdwait", 0); to just after the following `if' statement may do the trick. If the wakeup() from mddestroy() comes in before md_kthread() gets to the main loop, then it would be missed. I think jhb posted a better way of synchronising with kthreads during their destruction, but I haven't found the time to look into that yet. Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message