Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Nov 2002 17:13:05 -0500
From:      Hiten Pandya <hiten@angelica.unixdaemons.com>
To:        Ian Dowse <iedowse@maths.tcd.ie>
Cc:        Bruce Evans <bde@zeta.org.au>, "Vladimir B.  Grebenschikov" <vova@sw.ru>, "current@freebsd.org" <current@FreeBSD.ORG>
Subject:   Re: MD broken in current
Message-ID:  <20021128221305.GA78829@angelica.unixdaemons.com>
In-Reply-To: <200211271137.aa77228@salmon.maths.tcd.ie>
References:  <20021127215253.G7621-100000@gamplex.bde.org> <200211271137.aa77228@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 27, 2002 at 11:37:17AM +0000, Ian Dowse wrote the words in effect of:
> In message <20021127215253.G7621-100000@gamplex.bde.org>, Bruce Evans writes:
> >On Wed, 27 Nov 2002, Ian Dowse wrote:
> >> I think moving the line
> >>
> >> 	tsleep(sc, PRIBIO, "mdwait", 0);
> >>
> >> to just after the following `if' statement may do the trick. If the
> >
> >Wouldn't Giant locking prevent races here?  There is no locking in
> >sight for the ioctl, but ioctl() holds Giant.
> 
> Yes, but mddestroy() assumes that the kthread is waiting in the
> "mdwait" tsleep() when it calls wakeup(). That won't be true if the
> kthread has not yet had a chance to run, or if it is waiting to
> acquire Giant before entering the main loop (or if anything it calls
> drops Giant). Moving the check of the MD_SHUTDOWN to before the
> tsleep should catch all of these cases, and Giant ensures that the
> wakeup() does not occur after the flag is tested but before the
> tsleep().
> 

Is anyone planning to take this task, because, I think its important
that it is fixed.  Or should it be put on the 5.0-todo list?  If not, we
should put it in the BUGS section of mdconfig/ or the md(4) manual page.
IMO.

-- 
Hiten Pandya (hiten@unixdaemons.com, hiten@uk.FreeBSD.org)
http://www.unixdaemons.com/~hiten/

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?20021128221305.GA78829>