kern/72041: Deadlock when disk is destroyed while user process
phk at phk.freebsd.dk
Thu Sep 23 11:50:28 PDT 2004
The following reply was made to PR kern/72041; it has been noted by GNATS.
From: "Poul-Henning Kamp" <phk at phk.freebsd.dk>
To: Brian Eng <brian at midstream.com>
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: kern/72041: Deadlock when disk is destroyed while user process closes
Date: Thu, 23 Sep 2004 20:48:58 +0200
In message <200409231827.i8NIR3TK071354 at www.freebsd.org>, Brian Eng writes:
>One perspective on this is that cambio inverted the layers; normally,
>geom code calls cam code, but in the 'camcontrol rescan' case, cam
>code calls geom code, resulting in locks being taken in opposite
>order. Perhaps disk_destroy could just queue to g_event and not
>wait for completion.
A lot of the trouble in this area comes from the fact that the disk_*()
api has to isolate giant free code from giant infected code.
There are no easy fixes to currently remaining problems, they will take
serious work to fix.
I know there is some work on CAM going on behind the scenes and hopefully
they will take this sort of thing into account.
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-bugs