public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@gmail.com>
To: Marc MERLIN <marc@merlins.org>
Cc: ching <lsching17@gmail.com>,
	Eric Wheeler <bcache@lists.ewheeler.net>,
	linux-bcache@vger.kernel.org
Subject: Re: scrub backing device
Date: Fri, 13 May 2016 14:21:33 -0800	[thread overview]
Message-ID: <20160513222133.GA3784@kmo-pixel> (raw)
In-Reply-To: <20160511235748.GR18290@merlins.org>

On Wed, May 11, 2016 at 04:57:48PM -0700, Marc MERLIN wrote:
> On Thu, May 12, 2016 at 07:34:26AM +0800, ching wrote:
> > for example https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-scrub
>  
> btrfs scrub is designed to make sure all the blocks and checksums are
> consistent.
> Ching makes a good point that it would be helpful to have a way to
> access the underlying backing device directly to ensure it is
> consistent.
> 
> I think currently you can use dmsetup with an offset to get the real
> filesystem past the bcache header, mount that read only somewhere and
> scrub that.
> Not ideal because scrub will not be able to fix issues that are fixable,
> but at least it should report errors.

Look at the verify code in drivers/md/bcache/debug.c, there's a
CONFIG_BCACHE_DEBUG mode where every time it reads clean cached data it reads
the data from the backing device and compares.

But for a scrub though you really want to walk all the _cached_ data, so it'd
take a bit more code than that.

  parent reply	other threads:[~2016-05-13 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29  2:13 scrub backing device ching lu
2016-05-11  1:15 ` Eric Wheeler
2016-05-11  1:36   ` ching lu
2016-05-11 19:13     ` Eric Wheeler
2016-05-11 23:34       ` ching
2016-05-11 23:57         ` Marc MERLIN
2016-05-12 10:25           ` ching
2016-05-13 22:10             ` Marc MERLIN
2016-05-13 22:21           ` Kent Overstreet [this message]
2016-05-15 23:56             ` ching

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=20160513222133.GA3784@kmo-pixel \
    --to=kent.overstreet@gmail.com \
    --cc=bcache@lists.ewheeler.net \
    --cc=linux-bcache@vger.kernel.org \
    --cc=lsching17@gmail.com \
    --cc=marc@merlins.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