]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: duplicate extent btrees in xfs_repair need locking
authorDave Chinner <dchinner@redhat.com>
Sun, 14 Mar 2010 22:52:08 +0000 (09:52 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 14 Mar 2010 22:52:08 +0000 (09:52 +1100)
commit853a75b3b30b0556fb5f100d4087f1ce46769bd1
treedb49e4e18e0e2a56625e3c7546e0809cf2b6a523
parent91128e4cdb106b2db5ed4809a830c8740ef4f8b2
xfsprogs: duplicate extent btrees in xfs_repair need locking

The per-ag duplicate extent btrees can be search concurrently from multiple
threads. This occurs when inode extent lists are being processed and inodes
with extents in the same AG are checked concurrently. The btrees have an
internal traversal cursor, so doing concurrent searches can result in the
cursor being corrupted for both searches.

Add an external lock for each duplicate extent tree and use it for searches,
inserts and deletes to ensure that we don't trash the state of any operation.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
repair/incore_ext.c