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

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

 



On Mon, Apr 21, 2014 at 12:00:09AM -0700, Christoph Hellwig wrote:
> > +	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?

If we grow another user, I'll add an enum for it...

> Otherwise looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>

Thanks.

-- 
Dave Chinner
david@xxxxxxxxxxxxx

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux