Re: [PATCH 4/8] xfs: hoist inode cluster checks out of loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 31, 2018 at 06:08:52PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> Hoist the inode cluster checks out of the inobt record check loop into
> a separate function in preparation for refactoring of that loop.  No
> functional changes here; that's in the next patch.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
> ---
>  fs/xfs/scrub/ialloc.c |  119 +++++++++++++++++++++++++++----------------------
>  1 file changed, 65 insertions(+), 54 deletions(-)
> 
> 
> diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c
> index 5e593e4292b2..9af01ea0258d 100644
> --- a/fs/xfs/scrub/ialloc.c
> +++ b/fs/xfs/scrub/ialloc.c
...
> +/* Make sure the free mask is consistent with what the inodes think. */
> +STATIC int
> +xchk_iallocbt_check_freemask(
> +	struct xchk_btree		*bs,
> +	struct xfs_inobt_rec_incore	*irec)
> +{
> +	struct xfs_mount		*mp = bs->cur->bc_mp;
> +	xfs_agino_t			agino;
> +	int				error = 0;
> +
> +	for (agino = irec->ir_startino;
> +	     agino < irec->ir_startino + XFS_INODES_PER_CHUNK;
> +	     agino += mp->m_blocks_per_cluster * mp->m_sb.sb_inopblock) {

->m_inodes_per_cluster ?

Otherwise looks fine:

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

> +		error = xchk_iallocbt_check_cluster(bs, irec, agino);
> +		if (error)
> +			break;
>  	}
>  
>  	return error;
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux