[Btrfs-devel] checksum errors

Zach Brown zach.brown at oracle.com
Mon Jun 25 10:02:02 PDT 2007


On Mon, Jun 25, 2007 at 05:40:56PM +0300, Aliaksei Sheshka wrote:
> ?? ??????, 25/06/2007 ?? 16:13 +0200, Frank Groeneveld ??????????:
> > I'm interested in implementing the checksum calculation in mkfs,
> 
> Why it's needed in mkfs?

Metadata that is written by mkfs should have its checksums verified just
like any other written data.

The point of checksumming is to notice when data has been obviously
corrupted -- data written by mkfs is just as corruptible as anything
else on disk :).

> > however, I have problems using the crc32c function. In what library is
> > it defined?
> 
> I think crc32c defined somethere in the kernel and doesn't accessible
> from userspace. No ?

Right.  It's easy enough to hoist the table implementation out of the
kernel, though.  Adapting from the endian swapping interface that the
kernel uses to the interface Chris has used in userspace (I haven't
looked yet) will probably be the only tricky bit.

- z 



More information about the Btrfs-devel mailing list