linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] md/raid5: Using conf->max_degraded rather than 2 to determine whether there is excess compute-disks for raid4/5/6.
@ 2012-10-27  2:28 majianpeng
  2012-10-28 21:45 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2012-10-27  2:28 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

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))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* 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.
  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
  0 siblings, 0 replies; 2+ messages in thread
From: NeilBrown @ 2012-10-28 21:45 UTC (permalink / raw)
  To: majianpeng; +Cc: linux-raid

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-28 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).