On 2017年09月21日 04:31, Timofey Titovets wrote:
I was reading the kernel code and docs and didn't find anything about
some info like "cheksum type" as btrfs have for compression code.
(I only found some silent "hack" in btrfs-progs, that print "checksum
type", but get "checksum size")

Checksum type is global, so one btrfs fs uses the same checksum type for all its meta and data.

So checksum type is in superblock. Check btrfs_super_block->csum_type.


If i understood all correctly btrfs only store checksum size, i.e. 4
for current CRC32C.

Yes.


May be that can be useful to rewrite some part of code and reuse
checksum size, as checksum type.

For backward compatibility current CRC32C size can be used for identify CRC32C.

Since we have superblock csum type, why introducing new one?
(Unless you're going to allow multi csum algorithm to co-exist in one btrfs fs)

Thanks,
Qu
As that will not add any new checksum, that allow make that with zero "blood".
And later if we add new checksum type, that possible to add compat
flag for that.

What you think?

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to