From: Chris Mason <chris.mason@oracle.com>
To: Gregory Maxwell <gmaxwell@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Checksum and transform layering
Date: Mon, 08 Dec 2008 19:23:16 -0500 [thread overview]
Message-ID: <1228782196.3962.24.camel@think.oraclecorp.com> (raw)
In-Reply-To: <1225982445.15281.15.camel@think.oraclecorp.com>
On Thu, 2008-11-06 at 09:40 -0500, Chris Mason wrote:
> On Thu, 2008-11-06 at 01:34 -0500, Gregory Maxwell wrote:
> > I noticed in the compression support that the checksum is over the
> > uncompressed data.
>
> Thanks for looking things over, more eyes always helps.
>
> >
> > While this has the advantages that the checksum does not have to be
> > changed as transformations are changed and the system might catch
> > errors in the compression layer, this design decision will be
> > problematic if/when encryption is supported: Plaintext checksums
> > would leak substantial amounts of information about the content of
> > files.
>
> We checksum the uncompressed data because it allows us to layer other
> transformations without confusing the code, and because the checksums
> are strictly tied to logical offsets in the file. Additional metadata
> would be required to do things differently. It's possible but I'd
> prefer not to introduce that complexity.
>
Just FYI, the new disk format I've pushed out checksums the data on disk
instead of the uncompressed (or unencrypted) data. There are lots of
tradeoffs here, but I think this is a much better system overall.
Thanks for your feedback, it sparked me thinking of this now, before we
tried to finalize the disk format.
-chris
next prev parent reply other threads:[~2008-12-09 0:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 6:34 Checksum and transform layering Gregory Maxwell
2008-11-06 12:15 ` Claudio Martins
2008-11-06 17:49 ` Tracy Reed
[not found] ` <1225982445.15281.15.camel@think.oraclecorp.com>
2008-11-06 14:58 ` Gregory Maxwell
2008-11-06 15:27 ` Xavier Nicollet
2008-11-06 15:43 ` Gregory Maxwell
2008-12-09 0:23 ` Chris Mason [this message]
2008-11-06 16:31 ` Florian Weimer
2008-11-06 16:42 ` Gregory Maxwell
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=1228782196.3962.24.camel@think.oraclecorp.com \
--to=chris.mason@oracle.com \
--cc=gmaxwell@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.