[PATCH 10/10] repair: BMBT prefetch needs to be CRC aware

Christoph Hellwig hch at infradead.org
Tue Feb 25 11:25:18 CST 2014


>  	/*
>  	 * do some validation on the block contents
>  	 */
> -	if ((be32_to_cpu(block->bb_magic) != XFS_BMAP_MAGIC) ||
> +	if ((block->bb_magic != cpu_to_be32(XFS_BMAP_MAGIC) &&
> +	     block->bb_magic != cpu_to_be32(XFS_BMAP_CRC_MAGIC)) ||
>  			(be16_to_cpu(block->bb_level) != level))

Seems like this should be factored into a well-documented helper
function.



More information about the xfs mailing list