From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH 1/4] md/raid5: Reduce one write-operation when handle badsector
Date: Mon, 4 Mar 2013 12:43:30 +1100 [thread overview]
Message-ID: <20130304124330.7eb81dde@notabene.brown> (raw)
In-Reply-To: <201302281550584027165@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]
On Thu, 28 Feb 2013 15:51:01 +0800 majianpeng <majianpeng@gmail.com> wrote:
> For badsector,it took two steps:rewrite and reread.So for
> write-operation,it make no sense to rewrite after write-operation.
Please please please please please try to explain yourself better.
This patch doesn't make any sense. The write succeeded. We set the MadeGood
flag so that later code will remove the block from the bad-block list.
There will be no re-read or re-write.
NeilBrown
>
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> drivers/md/raid5.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 19d77a0..59c0569 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -1921,8 +1921,10 @@ static void raid5_end_write_request(struct bio *bi, int error)
> &rdev->mddev->recovery);
> } else if (is_badblock(rdev, sh->sector,
> STRIPE_SECTORS,
> - &first_bad, &bad_sectors))
> + &first_bad, &bad_sectors)) {
> set_bit(R5_MadeGood, &sh->dev[i].flags);
> + set_bit(R5_ReWrite, &sh->dev[i].flags);
> + }
> }
> rdev_dec_pending(rdev, conf->mddev);
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2013-03-04 1:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 7:51 [PATCH 1/4] md/raid5: Reduce one write-operation when handle badsector majianpeng
2013-03-04 1:43 ` NeilBrown [this message]
2013-03-04 1:52 ` majianpeng
2013-03-04 2:25 ` NeilBrown
2013-03-04 2:37 ` majianpeng
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=20130304124330.7eb81dde@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=majianpeng@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.