Date: Wed, 27 Nov 2002 22:03:33 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Ian Dowse <iedowse@maths.tcd.ie> Cc: Hiten Pandya <hiten@angelica.unixdaemons.com>, "Vladimir B. Grebenschikov" <vova@sw.ru>, "current@freebsd.org" <current@FreeBSD.ORG> Subject: Re: MD broken in current Message-ID: <20021127215253.G7621-100000@gamplex.bde.org> In-Reply-To: <200211271010.aa45800@salmon.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 27 Nov 2002, Ian Dowse wrote: > 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. Wouldn't Giant locking prevent races here? There is no locking in sight for the ioctl, but ioctl() holds Giant. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021127215253.G7621-100000>