| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 1/9] db: don't claim unchecked CRCs are correct |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Mon, 21 Apr 2014 00:00:09 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1397550301-31883-2-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1397550301-31883-1-git-send-email-david@xxxxxxxxxxxxx> <1397550301-31883-2-git-send-email-david@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
> + 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@xxxxxx>
|
| Previous by Date: | Re: [PATCH 1/2] xfs: return is not a function, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 2/9] db: verify buffer on type change, Christoph Hellwig |
| Previous by Thread: | [PATCH 1/9] db: don't claim unchecked CRCs are correct, Dave Chinner |
| Next by Thread: | Re: [PATCH 1/9] db: don't claim unchecked CRCs are correct, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |