]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid10: fix conversion from RAID0 to RAID10
authorNeilBrown <neilb@suse.de>
Thu, 12 Feb 2015 03:09:57 +0000 (14:09 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 12 Feb 2015 03:09:57 +0000 (14:09 +1100)
commit3e82e86d6699655f8199756a0339cee274b5a116
tree995504ece355dc6279170fb6cee3f8e85349b115
parente333e5c01ea9d0348926160f64fb80d897468573
md/raid10: fix conversion from RAID0 to RAID10

A RAID0 array (like a LINEAR array) does not have a concept
of 'size' being the amount of each device that is in use.
Rather, as much of each device as is available is used.
So the 'size' is set to 0 and ignored.

RAID10 does have this concept and needs it to be set correctly.
So when we convert RAID0 to RAID10 we must determine the
'size' (that being the size of the first 'strip_zone' in the
RAID0), and set it correctly.

Reported-and-tested-by: Xiao Ni <xni@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c