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

Christoph Hellwig
2014-02-25T17:25:25Z

> /*
> * 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.