]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: use recursive buffer locking
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Jan 2012 18:52:06 +0000 (18:52 +0000)
committerChristoph Hellwig <hch@lst.de>
Wed, 11 Jan 2012 18:52:06 +0000 (18:52 +0000)
commit50722af108c849c2512badadda1331c29fc4ee70
tree52ea38104bf874b7c6c7489c8750806d4b5e14b6
parentca30b0cb127974a013303f106c056534d7154878
repair: use recursive buffer locking

On a sufficiently corrupt filesystem walking the btree nodes might hit the
same node node again, which currently will deadlock.  Use a recursion
counter to avoid the direct deadlock and let them normal loop detection
(two bad nodes and out) do its work.  This is how repair behaved before
we added the lock when implementing buffer prefetching.

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>
include/libxfs.h
libxfs/rdwr.c