linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: Does data checksumming remain for files with No_COW file attribute?
Date: Mon, 26 Sep 2016 07:11:29 -0400	[thread overview]
Message-ID: <dadc90ae-7e18-a430-013c-f31a82b94b53@gmail.com> (raw)
In-Reply-To: <1474740691.7196.6.camel@scientia.net>

On 2016-09-24 14:11, Christoph Anton Mitterer wrote:
> On Sat, 2016-09-24 at 12:43 +0000, Hugo Mills wrote:
>>    It's because you can't update the data and the checksum atomically
>> -- at some point in the writing process, they must be inconsistent.
>> This is considered a Bad Thing.
>
> It's not worse at all than simply not cheksuming... in both cases you
> have no guarantee whether the data is bogus or not, but in with csums,
> you can at least tell - only at the little cost, of false positives
> when the data was fully and correctly written, but the csums not.
Except that without checksums, you don't lose all the data in that block 
when torn write happens, with checksums without COW, you do.  Also, 
IIUC, due to how BTRFS implements checksums, you have a bad block for 
the entire duration of the write, because the stored checksum is for the 
old block, not the current one.  Whether or not that matters is of 
course usage dependent, but it's still worth noting.  Personally, I'd 
rather be able to read the file and see that it's corrupted instead of 
getting -EIO trying to do so (I also would rather we had something other 
than -EIO to return when checksum verification fails, but that's a 
separate issue).

  parent reply	other threads:[~2016-09-26 11:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-24 12:26 Does data checksumming remain for files with No_COW file attribute? Alexander Tomokhov
2016-09-24 12:37 ` Hugo Mills
2016-09-24 23:25   ` Alexander Tomokhov
2016-09-24 23:50     ` Adam Borowski
2016-09-25  5:44       ` Duncan
2016-09-26 20:41         ` Adam Borowski
2016-09-24 12:40 ` Roman Mamedov
2016-09-24 12:43   ` Hugo Mills
2016-09-24 18:11     ` Christoph Anton Mitterer
2016-09-25 13:49       ` Goffredo Baroncelli
2016-09-25 19:53         ` Christoph Anton Mitterer
2016-09-26 11:11       ` Austin S. Hemmelgarn [this message]
2016-09-24 18:09   ` Christoph Anton Mitterer
2016-09-24 21:44     ` Adam Borowski
2016-09-24 22:52       ` Christoph Anton Mitterer

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=dadc90ae-7e18-a430-013c-f31a82b94b53@gmail.com \
    --to=ahferroin7@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 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).