linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: Christoph Hellwig <hch@infradead.org>,
	Dave Chinner <david@fromorbit.com>
Cc: Allison Henderson <allison.henderson@oracle.com>,
	linux-block@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	martin.petersen@oracle.com, shirley.ma@oracle.com
Subject: Re: [RFC PATCH v1 0/7] Block/XFS: Support alternative mirror device retry
Date: Sat, 8 Dec 2018 22:49:44 +0800	[thread overview]
Message-ID: <f7bf5329-e756-1edb-af3f-41aca02691fe@oracle.com> (raw)
In-Reply-To: <20181128074544.GA20702@infradead.org>

On 11/28/18 3:45 PM, Christoph Hellwig wrote:
> On Wed, Nov 28, 2018 at 04:33:03PM +1100, Dave Chinner wrote:
>> 	- how does propagation through stacked layers work?
> 
> The only way it works is by each layering driving it.  Thus my
> recommendation above bilding on your earlier one to use an index
> that is filled by the driver at I/O completion time.
> 
> E.g.
> 
> 	bio_init:		bi_leg = -1
> 
> 	raid1:			submit bio to lower driver
> 	raid 1 completion:	set bi_leg to 0 or 1
> 
> Now if we want to allow stacking we need to save/restore bi_leg
> before submitting to the underlying device.  Which is possible,
> but quite a bit of work in the drivers.
> 

I found it's still very challenge while writing the code.
save/restore bi_leg may not enough because the drivers don't know how to do fs-metadata verify.

E.g two layer raid1 stacking

fs:                  md0(copies:2)
                     /          \
layer1/raid1   md1(copies:2)    md2(copies:2)
                  /    \          /     \
layer2/raid1   dev0   dev1      dev2    dev3

Assume dev2 is corrupted
 => md2: don't know how to do fs-metadata verify. 
   => md0: fs verify fail, retry md1(preserve md2).
Then md2 will never be retried even dev3 may also has the right copy.
Unless the upper layer device(md0) can know the amount of copy is 4 instead of 2? 
And need a way to handle the mapping.
Did I miss something? Thanks!

-Bob

>> 	- is it generic/abstract enough to be able to work with
>> 	  RAID5/6 to trigger verification/recovery from the parity
>> 	  information in the stripe?
> 
> If we get the non -1 bi_leg for paritity raid this is an inidicator
> that parity rebuild needs to happen.  For multi-parity setups we could
> also use different levels there.
> 


  reply	other threads:[~2018-12-08 14:50 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28  3:49 [RFC PATCH v1 0/7] Block/XFS: Support alternative mirror device retry Allison Henderson
2018-11-28  3:49 ` [PATCH v1 1/7] block: add nr_mirrors to request_queue Allison Henderson
2018-11-28  3:49 ` [PATCH v1 2/7] block: expand write_hint of bio/request to rw_hint Allison Henderson
2018-11-28  3:49 ` [PATCH v1 3/7] md: raid1: handle bi_rw_hint accordingly Allison Henderson
2018-11-28  3:49 ` [PATCH v1 4/7] xfs: Add b_rw_hint to xfs_buf Allison Henderson
2018-11-28  5:03   ` Dave Chinner
2018-11-28  3:49 ` [PATCH v1 5/7] xfs: Add device retry Allison Henderson
2018-11-28  5:08   ` Dave Chinner
2018-11-28  5:22     ` Darrick J. Wong
2018-11-28  5:38       ` Dave Chinner
2018-11-28  7:35     ` Christoph Hellwig
2018-11-28 12:41       ` Bob Liu
2018-11-28 16:47         ` Allison Henderson
2018-11-28  3:49 ` [PATCH v1 6/7] xfs: Rewrite retried read Allison Henderson
2018-11-28  5:17   ` Dave Chinner
2018-11-28  5:26     ` Darrick J. Wong
2018-11-28  5:40       ` Dave Chinner
2018-11-28  3:49 ` [PATCH v1 7/7] xfs: Add tracepoints and logging to alternate device retry Allison Henderson
2018-11-28  5:33 ` [RFC PATCH v1 0/7] Block/XFS: Support alternative mirror " Dave Chinner
2018-11-28  5:49   ` Darrick J. Wong
2018-11-28  6:30     ` Dave Chinner
2018-11-28  7:15       ` Darrick J. Wong
2018-11-28 19:38     ` Andreas Dilger
2018-11-28  7:37   ` Christoph Hellwig
2018-11-28  7:46     ` Dave Chinner
2018-11-28  7:51       ` Christoph Hellwig
2018-11-28  7:45   ` Christoph Hellwig
2018-12-08 14:49     ` Bob Liu [this message]
2018-12-10  4:30       ` Darrick J. Wong

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=f7bf5329-e756-1edb-af3f-41aca02691fe@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=allison.henderson@oracle.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=shirley.ma@oracle.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).