xfs: fix the minrecs logic when dealing with inode root child blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Nov 2020 00:32:41 +0000 (16:32 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 18 Nov 2020 17:23:50 +0000 (09:23 -0800)
commite95b6c3ef1311dd7b20467d932a24b6d0fd88395
tree5e77b89d2dcabce94704e765cda7933899187041
parent2bd3fa793aaa7e98b74e3653fdcc72fa753913b5
xfs: fix the minrecs logic when dealing with inode root child blocks

The comment and logic in xchk_btree_check_minrecs for dealing with
inode-rooted btrees isn't quite correct.  While the direct children of
the inode root are allowed to have fewer records than what would
normally be allowed for a regular ondisk btree block, this is only true
if there is only one child block and the number of records don't fit in
the inode root.

Fixes: 08a3a692ef58 ("xfs: btree scrub should check minrecs")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/btree.c