>
> The result was a call from the block driver to the md driver with a
> lock held, and a rather unexpected call back from the md driver that
> impotently tried to take the same lock.
>
> Same thread.
>
OK, in this case, it didn't sound like your block driver
expected to be re-entered. Lucky the problem immediately
caused a deadlock ;)
More seriously, lets say you get around the above with
recursive locks:
Thread 1 Thread 2 (on another cpu)
enter the block driver
take the bd lock
issue an md ioctl
take the md lock
enter the block driver
spin on bd lock
automatically call md ioctl
spin on md lock
So the problem needs a rethink.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/