[PATCH 1/9] db: don't claim unchecked CRCs are correct

Christoph Hellwig hch at infradead.org
Mon Apr 21 02:00:09 CDT 2014


> +	switch (iocur_crc_valid()) {
> +	case -1:
> +		ok = "unchecked";
> +		break;
> +	case 0:
> +		ok = "bad";
> +		break;
> +	case 1:
> +		ok = "correct";
> +		break;
> +	default:
> +		ok = "unknown state";
> +		break;
> +	}

We should have symbolic constants for these return values.  But then
again iocur_crc_valid only has a single caller currently, is it even
worth the effort, or should we simply inline it?

Otherwise looks good,

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the xfs mailing list