From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Timofey Titovets <nefelim4ag@gmail.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: RFC: Btrfs does not store checksum type? Only size? O_o
Date: Thu, 21 Sep 2017 07:27:04 +0800 [thread overview]
Message-ID: <28d9d0f8-11b7-29c8-e540-61f18f1aa9a7@gmx.com> (raw)
In-Reply-To: <CAGqmi76MPGYFiksk5Jt05wjhQoQXpQuu1CiJFhxQw8QEB0gPpw@mail.gmail.com>
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.
>
prev parent reply other threads:[~2017-09-20 23:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 20:31 RFC: Btrfs does not store checksum type? Only size? O_o Timofey Titovets
2017-09-20 20:45 ` Hans van Kranenburg
2017-09-20 23:27 ` Qu Wenruo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28d9d0f8-11b7-29c8-e540-61f18f1aa9a7@gmx.com \
--to=quwenruo.btrfs@gmx.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nefelim4ag@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).