linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-btrfs@vger.kernel.org, Miao Xie <miaox@cn.fujitsu.com>,
	Jan Schmidt <list.btrfs@jan-o-sch.net>
Subject: Re: bi_vcnt checks for repair
Date: Sat, 12 Nov 2016 09:34:01 -0800	[thread overview]
Message-ID: <20161112173401.GA27521@infradead.org> (raw)
In-Reply-To: <20161111193151.GA30930@dhcp-whq-twvpn-1-vpnpool-10-159-131-21.vpn.oracle.com>

On Fri, Nov 11, 2016 at 11:31:51AM -0800, Liu Bo wrote:
> Try to explain it a bit, the following assumes that the data that's
> being read has at least one copy in another device,
> 
> if a read bio contains two pages and the second one is failing on
> checksum check, then we get into bio_readpage_error, in which it finds
> this bio has two pages, so it creats a new bio (so-called validation
> request) which only includes the fail-on-checksum victim page and issues
> it with REQ_FAILFAST_DEV to read the page again in hope of passing the
> checksum check, if it stills fails somehow, it comes into
> bio_readpage_error again to do another try but along with a different
> copy.
> 
> Overall, this bi_vcnt is to tell whether the bio is a normal one and a
> validation one.  If the validation bio got merged somehow, then we need
> to do something to prevent that from happening.

Can't we just set a different end_io handler for the two cases?

      reply	other threads:[~2016-11-12 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-10 20:06 bi_vcnt checks for repair Christoph Hellwig
2016-11-11 19:31 ` Liu Bo
2016-11-12 17:34   ` Christoph Hellwig [this message]

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=20161112173401.GA27521@infradead.org \
    --to=hch@infradead.org \
    --cc=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list.btrfs@jan-o-sch.net \
    --cc=miaox@cn.fujitsu.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).