summaryrefslogtreecommitdiffstats
path: root/fs/xfs/scrub
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-02-01 09:08:49 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2019-02-11 16:06:38 -0800
commit435dcf0787fde20d99ede873cf56dc27c22f2c30 (patch)
tree8a5338c3f85b836fcacd9f0b7b6cf59d0c91a3ec /fs/xfs/scrub
parentd13937116f1e82bf508a6325111b322c30c85eb9 (diff)
downloadlinux-435dcf0787fde20d99ede873cf56dc27c22f2c30.tar.bz2
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: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r--fs/xfs/scrub/ialloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c
index 882dc56c5c21..fd431682db0b 100644
--- a/fs/xfs/scrub/ialloc.c
+++ b/fs/xfs/scrub/ialloc.c
@@ -203,7 +203,8 @@ xchk_iallocbt_check_freemask(
int error = 0;
/* 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;
agino < irec->ir_startino + XFS_INODES_PER_CHUNK;