UFS2 metadata checksums

Ivan Voras ivoras at freebsd.org
Mon Apr 27 11:24:00 UTC 2009


Scott Burns wrote:
> Ivan Voras wrote:
>> Scott Burns wrote:
>>
>>> As long as there is some interest in this kind of functionality, I will
>>> continue working on it.  The next step is to protect metadata structures
>>> beyond inodes.  I am hoping to have some results to post in the next few
>>> weeks.
>>
>> Btw. what checksum do you use?
> 
> I haven't settled on anything yet.  Currently I'm just reading the
> dinode structure 32 bits at a time and doing a bitwise XOR.  It's just a
> proof of concept and I am open to suggestions.

For 32 bits of hash, adler32 or crc32 should be ok - the code is already
used in the system for various purposes. Adler32 is faster; for a sample
implementation see sys/net/zlib.c at line 5357.

ZFS defaults to "fletcher2" (I guess 16-bit Fletcher?) which should be
faster but its implementation could be a bit problematic (see
http://opensolaris.org/jive/thread.jspa?threadID=69655&tstart=0).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20090427/0a221bf2/signature.pgp


More information about the freebsd-fs mailing list