]> git.ipfire.org Git - thirdparty/mdadm.git/commit
analyse_change: fix calculation of after.data_disks and ->delta_disks.
authorNeilBrown <neilb@suse.de>
Mon, 14 Feb 2011 01:17:08 +0000 (12:17 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 14 Feb 2011 01:17:08 +0000 (12:17 +1100)
commitb545e14a2142b946446cf80127c7c8801dab55c8
tree567ead7c4d8934c3a299247cd0e133398c1bec13
parentf0cce4425b9dacadc22819163818284671d3008a
analyse_change: fix calculation of after.data_disks and ->delta_disks.

When changing level when a new number of raid disks was explicitly
specified, we much make sure that the change implied by the
change in level is properly incorporated into the final result.

So explicitly track the change in number of parity disks
(delta_parity) and use it together with delta_disks to determine
final data_disks.
Also set info->delta_disks so other code doesn't need to mirror
this analysis.

And add some errors in cases where a new number of disks was
requested but is not currently supported

Reported-by: Adam Kwolek <adam.kwolek@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c