Re: [PATCH 10/39] xfs_db: add support for checking the refcount btree

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

 



On Tue, Oct 25, 2016 at 04:04:39PM -0700, Darrick J. Wong wrote:
> Do some basic checks of the refcount btree.  xfs_repair will have to
> check that the reference counts match the various bmbt mappings.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
.....
> @@ -1561,10 +1597,15 @@ check_set_dbmap(
>  			agbno, agbno + len - 1, c_agno, c_agbno);
>  		return;
>  	}
> -	check_dbmap(agno, agbno, len, type1);
> +	check_dbmap(agno, agbno, len, type1, is_reflink(type2));
>  	mayprint = verbose | blist_size;
>  	for (i = 0, p = &dbmap[agno][agbno]; i < len; i++, p++) {
> -		*p = (char)type2;
> +		if (*p == DBM_RLDATA && type2 == DBM_DATA)
> +			;	/* do nothing */
> +		if (*p == DBM_DATA && type2 == DBM_DATA)
> +			*p = (char)DBM_RLDATA;
> +		else
> +			*p = (char)type2;

What this /* do nothing */ case for?

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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