]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: fix an ABBA deadlock in inode prefetching
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Jan 2012 18:52:17 +0000 (18:52 +0000)
committerChristoph Hellwig <hch@lst.de>
Wed, 11 Jan 2012 18:52:17 +0000 (18:52 +0000)
commit3724f6745435a4c54fe420f86bb97343d6095fd8
treeee442f663442e519fea9a0cdb1630ef02e313c97
parent50722af108c849c2512badadda1331c29fc4ee70
repair: fix an ABBA deadlock in inode prefetching

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.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reported-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Tested-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Signed-off-by: Christoph Hellwig <hch@lst.de>
repair/prefetch.c