[PATCH 07/12] repair: fix another ABBA deadlock in inode prefetching

Dave Chinner david at fromorbit.com
Mon Dec 12 20:35:14 CST 2011


On Fri, Dec 02, 2011 at 12:46:26PM -0500, Christoph Hellwig wrote:
> The inode prefetching code has a fixed limit of inodes that might are
> submitted at a time.  Unfortunately the buffers for them get locked
> once the prefetching starts.  That way the threads processing the inode
> might get stuck on buffer locked, but not submitted for reading yet.
> 
> Fix this by kicking the queue as soon as we would have to wait on the
> ra_count semaphore.
> 
> Reported-by: Arkadiusz Mi??kiewicz <arekm at maven.pl>
> Tested-by: Arkadiusz Mi??kiewicz <arekm at maven.pl>
> Signed-off-by: Christoph Hellwig <hch at lst.de>

Looks safe - I can't think up a scenario that would deadlock on
the second sem_wait call...

Reviewed-by: Dave Chinner <dchinner at redhat.com>

-- 
Dave Chinner
david at fromorbit.com




More information about the xfs mailing list