From: Shaohua Li <shli@fb.com>
To: linux-raid@vger.kernel.org
Cc: Guoqing Jiang <gqjiang@suse.com>, NeilBrown <neilb@suse.com>
Subject: [PATCH] md/raid10: skip spare disk as 'first' disk
Date: Mon, 1 May 2017 12:22:01 -0700 [thread overview]
Message-ID: <7adb3f88bd6d611511ad14dcf8da6898e5f8168d.1493666464.git.shli@fb.com> (raw)
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
next reply other threads:[~2017-05-01 19:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 19:22 Shaohua Li [this message]
2017-05-02 1:22 ` [PATCH] md/raid10: skip spare disk as 'first' disk Guoqing Jiang
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=7adb3f88bd6d611511ad14dcf8da6898e5f8168d.1493666464.git.shli@fb.com \
--to=shli@fb.com \
--cc=gqjiang@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.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