Re: [PATCH 4/9] repair: detect and correct CRC errors in directory blocks

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

 



On Tue, Apr 15, 2014 at 06:24:56PM +1000, Dave Chinner wrote:
> + * Need to handle CRC and validation errors specially here. If
> + * there is a validator error, re-read without the verifier so
> + * that we get a buffer we can check and repair. Re-attach the
> + * ops to the buffer after the read so that when it is rewritten
> + * the CRC is recalculated.
> + *
> + * Returns a positive error on failure, 0 for success, and negative
> + * error if a verifier error occurred and we reread the block without
> + * the verifier successfully.

This comment doesn't come clear to using up the 80 character allowance
:)

I have to say the positive and negative errno convention is a bit
confusing to me.  I'd rather always return 0 if we could read it, and
pass a bool *crc_error instead that indicates if it needs fixing.

_______________________________________________
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