linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Calvin Walton <calvin.walton@kepstin.ca>
To: Hugo Mills <hugo@carfax.org.uk>
Cc: "Matwey V. Kornilov" <matwey.kornilov@gmail.com>,
	Austin S Hemmelgarn <ahferroin7@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: btrfs: obtain block checksums from user space
Date: Mon, 28 Sep 2015 19:25:45 -0400	[thread overview]
Message-ID: <1443482745.12614.5.camel@kepstin.ca> (raw)
In-Reply-To: <20150928231612.GB25907@carfax.org.uk>

On Mon, 2015-09-28 at 23:16 +0000, Hugo Mills wrote:
> On Mon, Sep 28, 2015 at 07:11:51PM -0400, Calvin Walton wrote:

> > 
> > The problem with trying to use btrfs checksums to compare two
> > different
> > files is that the blocks might not match up, if only due to
> > fragmentation. E.g., the same 1gb file might be stored like this on
> > one
> > machine:
> > 
> > [ 256MB ][    512 MB    ][ 256MB ]
> > 
> > And like this on the other:
> > [     512MB     ][     512MB     ]
> > 
> > Since the checksums are per block, and the blocks can be different
> > arrangements on different machines, they're not really all that
> > useful
> > for doing comparisons like you want.
> 
>    No, those are extents, not blocks, and the FS doesn't checksum in
> extents. :) Blocks are 4 KiB in size.

Oh, wow, btrfs is storing a lot more checksums than I thought it was...

Thanks for clearing up my misconception.

-- 
Calvin Walton <calvin.walton@kepstin.ca>


  reply	other threads:[~2015-09-28 23:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-24 18:06 btrfs: obtain block checksums from user space Matwey V. Kornilov
2015-09-24 18:35 ` Austin S Hemmelgarn
2015-09-24 18:48   ` Matwey V. Kornilov
2015-09-24 19:47     ` Austin S Hemmelgarn
2015-09-28 23:11     ` Calvin Walton
2015-09-28 23:16       ` Hugo Mills
2015-09-28 23:25         ` Calvin Walton [this message]
2015-10-01 16:59 ` David Sterba

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=1443482745.12614.5.camel@kepstin.ca \
    --to=calvin.walton@kepstin.ca \
    --cc=ahferroin7@gmail.com \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=matwey.kornilov@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).