Re: [PATCH] repair: avoid ABBA deadlocks on prefetched buffers

Mark Tinguely
2012-01-13T20:09:59Z

On 01/-10/63 13:59, Christoph Hellwig wrote:
> Both the prefetch threads and actual repair processing threads can have
> multiple buffers at a time locked, but they do no use a common locker
> order, which can lead to ABBA deadlocks while trying to lock the buffers.
>
> Switch the prefetch code to do a trylock and skip buffers that have
> already been locked to avoid this deadlock.
>
> Reported-by: Arkadiusz Mi??kiewicz<arekm@maven.pl>
> Signed-off-by: Christoph Hellwig<hch@lst.de>
>

Part of a series of fixes. Needed for "
[PATCH 06/12] repair: use recursive buffer locking" patch.

Reviewed-by: Mark Tinguely <tinguely@sgi.com>