Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Jon Panozzo <jonp@lime-technology.com>, Duncan <1i5t5.duncan@cox.net>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Scrub on btrfs single device only to detect errors, not correct them?
Date: Mon, 7 Dec 2015 10:01:28 -0500	[thread overview]
Message-ID: <56659F48.6000800@gmail.com> (raw)
In-Reply-To: <CA+pSGYeYwC=eWmSuC4MXsSz1qVvWqzxxv7KzxkhQ84BKUDO-MA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

On 2015-12-07 09:47, Jon Panozzo wrote:
> And I'll throw this question out to everyone:
>
> Let's say I have a means of providing parity for a btrfs device, but
> in a way that's external to btrfs (imagine a btrfs single device as
> part of a hardware or software RAID).  If BTRFS detected an error
> during a scrub, and parity wasn't updated as a result (say the result
> of bitrot on the btrfs device), couldn't parity be used to repair the
> broken bit(s)?  If so, the big question is how to use scrub to
> determine the sector/bit (forgive me if I'm using wrong terminology)
> at the block level that needs to be fixed.  I think my theory is sound
> in principle, but not sure if it's possible to correlate a scrub-found
> uncorrectable error to a physical location on the block device.
>
In theory, this is possible, but it's _really_ tricky to do right. 
BTRFS uses it's own internal block addressing that is mostly independent 
from what's done at the block device level, which makes things 
non-trivial to map to actual addresses.  On top of that, it's 
non-trivial to get a address for a block that failed the scrub 
operation.  It's probably easier to just run a check on the lower-level 
device if scrub reports errors.  If that fails, then it's probably 
fixable by the lower level directly, if it passes, then the issue is 
probably a bug in BTRFS.



[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]

  reply	other threads:[~2015-12-07 15:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-06 19:15 Scrub on btrfs single device only to detect errors, not correct them? Jon Panozzo
2015-12-06 20:42 ` Chris Murphy
2015-12-07  3:48   ` Duncan
2015-12-07 14:43     ` Jon Panozzo
2015-12-08 13:38       ` Duncan
2015-12-07 14:47     ` Jon Panozzo
2015-12-07 15:01       ` Austin S Hemmelgarn [this message]
2015-12-07 15:12         ` Jon Panozzo
2015-12-07 15:39           ` Austin S Hemmelgarn
2015-12-08 14:15             ` Duncan

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=56659F48.6000800@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=1i5t5.duncan@cox.net \
    --cc=jonp@lime-technology.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