Re: Race conditions galore (2.0.33 and possibly 2.1.x)

Gadi Oxman (
Tue, 23 Dec 1997 10:10:29 +0300 (IST)

On Mon, 22 Dec 1997, Dan Hollis wrote:

> On Mon, 22 Dec 1997, Ricky Beam wrote:
> > Letting the chips fall where they may, I quote Linus Torvalds:
> > >Ahh, the md driver does indeed do something like this. The md driver
> > >will clear the lock bit without ever waking up anybody that waits on it,
> > >as far as I can tell.
> > Gee, I wonder if this is what causes our news server (sparc) to occassionaly
> > get a task that takes over the machine -- priority -33.
> Same here. We're running md and occasionally get stuck tasks. Also some
> occasional file corruption although im not sure if its from inn itself or
> the md driver. (Looks like md though).
> -Dan

To clarify, that clear_bit(BH_Lock, ...) code in the MD driver is:

- included only in RAID1/RAID5 and not in RAID0.
- Is not incorrect.

If the problems are visible with RAID0, there might be a bug in the MD
driver or there might be another problem which is triggered by MD, but
it is not as simple as clearing the locked bit without waking up the
waiters on that buffer -- something more subtle seems to be involved.