]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: check plausibility of root dir pointer before trashing it
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 27 Feb 2020 20:05:47 +0000 (15:05 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 27 Feb 2020 20:05:47 +0000 (15:05 -0500)
commitded6b55889acf0edf0a8e12744cc05a6d4677e29
treeef31080cc8d2633ae77817a27b2b7715de641e9e
parent90b2397eb94daba3bc37d853e31415e45b8e5f9a
xfs_repair: check plausibility of root dir pointer before trashing it

If sb_rootino doesn't point to where we think mkfs should have allocated
the root directory, check to see if the alleged root directory actually
looks like a root directory.  If so, we'll let it live because someone
could have changed sunit since formatting time, and that changes the
root directory inode estimate.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/xfs_repair.c