Skip to content

Commit b506335

Browse files
committed
md/raid10: skip spare disk as 'first' disk
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>
1 parent 43ac9b8 commit b506335

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/md/raid10.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4079,8 +4079,8 @@ static int raid10_start_reshape(struct mddev *mddev)
40794079
diff = 0;
40804080
if (first || diff < min_offset_diff)
40814081
min_offset_diff = diff;
4082+
first = 0;
40824083
}
4083-
first = 0;
40844084
}
40854085

40864086
if (max(before_length, after_length) > min_offset_diff)

0 commit comments

Comments
 (0)