* [PATCH] md/raid10: skip spare disk as 'first' disk
@ 2017-05-01 19:22 Shaohua Li
2017-05-02 1:22 ` Guoqing Jiang
0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2017-05-01 19:22 UTC (permalink / raw)
To: linux-raid; +Cc: Guoqing Jiang, NeilBrown
Commit 6f287ca(md/raid10: reset the 'first' at the end of loop) ignores
a case in reshape, the first rdev could be a spare disk, which shouldn't
be accounted as the first disk since it doesn't include the offset info.
Fix: 6f287ca(md/raid10: reset the 'first' at the end of loop)
Cc: Guoqing Jiang <gqjiang@suse.com>
Cc: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
---
drivers/md/raid10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 2883b72..cce23be 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -4079,8 +4079,8 @@ static int raid10_start_reshape(struct mddev *mddev)
diff = 0;
if (first || diff < min_offset_diff)
min_offset_diff = diff;
+ first = 0;
}
- first = 0;
}
if (max(before_length, after_length) > min_offset_diff)
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] md/raid10: skip spare disk as 'first' disk
2017-05-01 19:22 [PATCH] md/raid10: skip spare disk as 'first' disk Shaohua Li
@ 2017-05-02 1:22 ` Guoqing Jiang
0 siblings, 0 replies; 2+ messages in thread
From: Guoqing Jiang @ 2017-05-02 1:22 UTC (permalink / raw)
To: Shaohua Li, linux-raid; +Cc: NeilBrown
On 05/02/2017 03:22 AM, Shaohua Li wrote:
> Commit 6f287ca(md/raid10: reset the 'first' at the end of loop) ignores
> a case in reshape, the first rdev could be a spare disk, which shouldn't
> be accounted as the first disk since it doesn't include the offset info.
Acked-by: Guoqing Jiang <gqjiang@suse.com>
Thanks,
Guoqing
> Fix: 6f287ca(md/raid10: reset the 'first' at the end of loop)
> Cc: Guoqing Jiang <gqjiang@suse.com>
> Cc: NeilBrown <neilb@suse.com>
> Signed-off-by: Shaohua Li <shli@fb.com>
> ---
> drivers/md/raid10.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 2883b72..cce23be 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -4079,8 +4079,8 @@ static int raid10_start_reshape(struct mddev *mddev)
> diff = 0;
> if (first || diff < min_offset_diff)
> min_offset_diff = diff;
> + first = 0;
> }
> - first = 0;
> }
>
> if (max(before_length, after_length) > min_offset_diff)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-02 1:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-01 19:22 [PATCH] md/raid10: skip spare disk as 'first' disk Shaohua Li
2017-05-02 1:22 ` Guoqing Jiang
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.