xfs
[Top] [All Lists]

Re: RFC: log record CRC validation

To: David Chinner <dgc@xxxxxxx>
Subject: Re: RFC: log record CRC validation
From: Andi Kleen <andi@xxxxxxxxxxxxxx>
Date: 27 Jul 2007 01:01:15 +0200
Cc: Mark Goodwin <markgw@xxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20070726055501.GF12413810@sgi.com>
References: <20070725092445.GT12413810@sgi.com> <46A7226D.8080906@sgi.com> <20070726055501.GF12413810@sgi.com>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
David Chinner <dgc@xxxxxxx> writes:
> 
> Nope. To do that, we'd need to implement some type of Reed-Solomon
> coding and would need to use more bits on disk to store the ECC
> data. That would have a much bigger impact on log throughput than a
> table based CRC on a chunk of data that is hot in the CPU cache. 

Processing or rewriting cache hot data shouldn't be significantly
different in cost (assuming the basic CPU usage of the algorithms
is not too different); just the cache lines need to be already exclusive
which is likely the case with logs.

> And we'd have to write the code as well. ;)

Modern kernels have R-S functions in lib/reed_solomon. They
are used in some of the flash file systems. I haven't checked
how their performance compares to standard CRC though.

> 
> However, I'm not convinced that this sort of error correction is the
> best thing to do at a high level as all the low level storage
> already does Reed-Solomon based bit error correction.  I'd much
> prefer to use a different method of redundancy in the filesystem so
> the error detection and correction schemes at different levels don't
> have the same weaknesses.

Agreed. On the file system level the best way to handle this is 
likely data duplicated on different blocks.

> That means the filesystem needs strong enough CRCs to detect bit
> errors and sufficient structure validity checking to detect gross
> errors.  XFS already does pretty good structure checking; we don't

The trouble is that it tends to go to too drastic measures (shutdown) if it
detects any inconsistency.

-Andi


<Prev in Thread] Current Thread [Next in Thread>