Skip to content

Commit

Permalink
md/raid10: skip spare disk as 'first' disk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shaohua Li committed May 1, 2017
1 parent 43ac9b8 commit b506335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b506335

Please sign in to comment.