Commit 435dcf07 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: never try to scrub more than 64 inodes per inobt record

Make sure we never check more than XFS_INODES_PER_CHUNK inodes for any
given inobt record since there can be more than one inobt record mapped
to an inode cluster.
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent d1393711
...@@ -203,7 +203,8 @@ xchk_iallocbt_check_freemask( ...@@ -203,7 +203,8 @@ xchk_iallocbt_check_freemask(
int error = 0; int error = 0;
/* Make sure the freemask matches the inode records. */ /* Make sure the freemask matches the inode records. */
nr_inodes = mp->m_inodes_per_cluster; nr_inodes = min_t(unsigned int, XFS_INODES_PER_CHUNK,
mp->m_inodes_per_cluster);
for (agino = irec->ir_startino; for (agino = irec->ir_startino;
agino < irec->ir_startino + XFS_INODES_PER_CHUNK; agino < irec->ir_startino + XFS_INODES_PER_CHUNK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment