From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH 5/5] md/raid5: Using conf->max_degraded rather than 2 to determine whether there is excess compute-disks for raid4/5/6.
Date: Mon, 29 Oct 2012 08:45:51 +1100 [thread overview]
Message-ID: <20121029084551.16188427@notabene.brown> (raw)
In-Reply-To: <201210271028214347208@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 988 bytes --]
On Sat, 27 Oct 2012 10:28:25 +0800 majianpeng <majianpeng@gmail.com> wrote:
> In func analyse_stripe, about judging how many want-computer disks,it
> used 2.But for raid4/5, it is at most is one.So using conf->max_degraded
> to replace.
>
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
> drivers/md/raid5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
> index 684ca76..930dee0 100644
> --- a/drivers/md/raid5.c
> +++ b/drivers/md/raid5.c
> @@ -3285,7 +3285,7 @@ static void analyse_stripe(struct stripe_head *sh, struct stripe_head_state *s)
> s->uptodate++;
> if (test_bit(R5_Wantcompute, &dev->flags)) {
> s->compute++;
> - BUG_ON(s->compute > 2);
> + BUG_ON(s->compute > conf->max_degraded);
> }
>
> if (test_bit(R5_Wantfill, &dev->flags))
If I were to bother changing that code at all, I'd just remove the BUG_ON.
But I won't bother.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2012-10-28 21:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-27 2:28 [PATCH 5/5] md/raid5: Using conf->max_degraded rather than 2 to determine whether there is excess compute-disks for raid4/5/6 majianpeng
2012-10-28 21:45 ` NeilBrown [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=20121029084551.16188427@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.