]> www.infradead.org Git - users/dwmw2/linux.git/commit
md/raid10: reset the 'first' at the end of loop
authorGuoqing Jiang <gqjiang@suse.com>
Thu, 6 Apr 2017 01:12:18 +0000 (09:12 +0800)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:58 +0000 (21:33 -0400)
commitcca3fadc5c581da9967c27c88b2c82e4055e68f9
treedb93e368e614ca2f4c74ba10e6394a9a836d17e0
parent55e1ac2f07c5662a546fdeb929d44caad24f59b2
md/raid10: reset the 'first' at the end of loop

[ Upstream commit 6f287ca6046edd34ed83aafb7f9033c9c2e809e2 ]

We need to set "first = 0' at the end of rdev_for_each
loop, so we can get the array's min_offset_diff correctly
otherwise min_offset_diff just means the last rdev's
offset diff.

Suggested-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
drivers/md/raid10.c