Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Guoqing Jiang <gqjiang@suse.com>
To: Shaohua Li <shli@fb.com>, linux-raid@vger.kernel.org
Cc: NeilBrown <neilb@suse.com>
Subject: Re: [PATCH] md/raid10: skip spare disk as 'first' disk
Date: Tue, 2 May 2017 09:22:57 +0800	[thread overview]
Message-ID: <5907DF71.10806@suse.com> (raw)
In-Reply-To: <7adb3f88bd6d611511ad14dcf8da6898e5f8168d.1493666464.git.shli@fb.com>



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)


      reply	other threads:[~2017-05-02  1:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 19:22 [PATCH] md/raid10: skip spare disk as 'first' disk Shaohua Li
2017-05-02  1:22 ` Guoqing Jiang [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=5907DF71.10806@suse.com \
    --to=gqjiang@suse.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=shli@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox