Commit 688f7c36 authored by Darrick J. Wong's avatar Darrick J. Wong

xfs: clean up long conditionals in xfs_iwalk_ichunk_ra

Refactor xfs_iwalk_ichunk_ra to avoid long conditionals.
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent 5e29f3b7
...@@ -83,16 +83,16 @@ xfs_iwalk_ichunk_ra( ...@@ -83,16 +83,16 @@ xfs_iwalk_ichunk_ra(
agbno = XFS_AGINO_TO_AGBNO(mp, irec->ir_startino); agbno = XFS_AGINO_TO_AGBNO(mp, irec->ir_startino);
blk_start_plug(&plug); blk_start_plug(&plug);
for (i = 0; for (i = 0; i < XFS_INODES_PER_CHUNK; i += igeo->inodes_per_cluster) {
i < XFS_INODES_PER_CHUNK; xfs_inofree_t imask;
i += igeo->inodes_per_cluster,
agbno += igeo->blocks_per_cluster) { imask = xfs_inobt_maskn(i, igeo->inodes_per_cluster);
if (xfs_inobt_maskn(i, igeo->inodes_per_cluster) & if (imask & ~irec->ir_free) {
~irec->ir_free) {
xfs_btree_reada_bufs(mp, agno, agbno, xfs_btree_reada_bufs(mp, agno, agbno,
igeo->blocks_per_cluster, igeo->blocks_per_cluster,
&xfs_inode_buf_ops); &xfs_inode_buf_ops);
} }
agbno += igeo->blocks_per_cluster;
} }
blk_finish_plug(&plug); blk_finish_plug(&plug);
} }
......
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