xfs: check the ir_startino alignment directly
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Feb 2019 17:08:50 +0000 (09:08 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 12 Feb 2019 00:06:38 +0000 (16:06 -0800)
commitc050fdfeb575a57ba955427142469b2d2e5f7ac2
tree7371af6690a3c281e17cacfd462c52579983cd0d
parent435dcf0787fde20d99ede873cf56dc27c22f2c30
xfs: check the ir_startino alignment directly

In xchk_iallocbt_rec, check the alignment of ir_startino by converting
the inode cluster block alignment into units of inodes instead of the
other way around (converting ir_startino to blocks).  This prevents us
from tripping over off-by-one errors in ir_startino which are obscured
by the inode -> block conversion.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/ialloc.c