From: Liu Bo <bo.li.liu@oracle.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix wrong failed mirror_num of read-repair on raid56
Date: Tue, 28 Mar 2017 21:54:24 -0700 [thread overview]
Message-ID: <20170329045424.GB306@lim.localdomain> (raw)
In-Reply-To: <20170327170715.GL4781@twin.jikos.cz>
On Mon, Mar 27, 2017 at 07:07:15PM +0200, David Sterba wrote:
> On Fri, Mar 24, 2017 at 12:13:42PM -0700, Liu Bo wrote:
> > In raid56 senario, after trying parity recovery, we didn't set
> > mirror_num for btrfs_bio with failed mirror_num, hence
> > end_bio_extent_readpage() will report a random mirror_num in dmesg
> > log.
> >
> > Cc: David Sterba <dsterba@suse.cz>
> > Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
> > ---
> > fs/btrfs/volumes.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> > index 73d56ee..be64e4a 100644
> > --- a/fs/btrfs/volumes.c
> > +++ b/fs/btrfs/volumes.c
> > @@ -6197,6 +6197,7 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
> > } else {
> > ret = raid56_parity_recover(fs_info, bio, bbio,
> > map_length, mirror_num, 1);
> > + btrfs_io_bio(bio)->mirror_num = mirror_num;
>
> Should the mirror be set inside raid56_parity_recover? There's another
> caller, scrub_submit_raid56_bio_wait, that does not update the
> bio->mirror_num. I am not sure if this is the same case though.
>
scrub_submit_raid56_bio_wait doesn't need to, but yes, we could set the
mirror inside raid56_parity_recover iff @generic_io is 1.
Thanks,
-liubo
> > }
> >
> > btrfs_bio_counter_dec(fs_info);
next prev parent reply other threads:[~2017-03-29 4:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-24 19:13 [PATCH] Btrfs: fix wrong failed mirror_num of read-repair on raid56 Liu Bo
2017-03-27 17:07 ` David Sterba
2017-03-29 4:54 ` Liu Bo [this message]
2017-03-29 17:54 ` [PATCH v2] " Liu Bo
2017-03-30 11:43 ` David Sterba
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=20170329045424.GB306@lim.localdomain \
--to=bo.li.liu@oracle.com \
--cc=dsterba@suse.cz \
--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).