xfs: make xchk_iget safer in the presence of corrupt inode btrees
authorDarrick J. Wong <djwong@kernel.org>
Thu, 7 Dec 2023 02:40:54 +0000 (18:40 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 7 Dec 2023 02:45:17 +0000 (18:45 -0800)
commit3f113c2739b1b068854c7ffed635c2bd790d1492
treeeb90502a370c94b61dad3bae880afacfb106a796
parent9c07bca793b4ff9f0b7871e2a928a1b28b8fa4e3
xfs: make xchk_iget safer in the presence of corrupt inode btrees

When scrub is trying to iget an inode, ensure that it won't end up
deadlocked on a cycle in the inode btree by using an empty transaction
to store all the buffers.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/common.c
fs/xfs/scrub/common.h
fs/xfs/scrub/inode.c