]> git.ipfire.org Git - thirdparty/mdadm.git/commit
FIX: Check correct 'old' level to see if reshape is needed.
authorAdam Kwolek <adam.kwolek@intel.com>
Tue, 8 Mar 2011 12:24:55 +0000 (13:24 +0100)
committerNeilBrown <neilb@suse.de>
Wed, 9 Mar 2011 07:42:40 +0000 (18:42 +1100)
commiteae35f5c55281caa3ba6be0d77ad9a1c6b74bbd8
treee6bbfcbdccde166473a3638ce602684bf179643f
parente06c4e59b328ed881007962d22db17bfe9e07b6c
FIX: Check correct 'old' level to see if reshape is needed.

Normally when reshape_array is called with restart == 0,
info->array is the same as the 'array' read from the kernel
(via ioctl) so both have the same level.

However when called from reshape_container, info->array was
generated by the metadata so it will have 'level' set to the
intermediate (or final) level already.

So to test if we need to change the level, we need to compare the
desired level with that which was loaded from the kernel (array.level)
rather than that which was read from metadata (info->array.level).

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