]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.h
kill-subarray: fix, IMSM cannot kill-subarray with unsupported metadata
authorLabun, Marcin <Marcin.Labun@intel.com>
Mon, 31 Oct 2011 00:29:46 +0000 (11:29 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Oct 2011 00:29:46 +0000 (11:29 +1100)
commit81219e70f2a9be7292046860ea15528fe5854cab
tree6e964755844055702ee3e40385df3853dac9b3cb
parentdb7fdfe422a7d280b1fae999cb72b20b0e58756c
kill-subarray: fix, IMSM cannot kill-subarray with unsupported metadata

container_content retrieves volume information from disks in the
container.  For unsupported volumes the function was not returning
mdinfo. When all volumes were unsupported the function was returning
NULL pointer to block actions on the volumes. Therefore, such volumes
were not activated in Incremental and Assembly. As side effect they
also could not be deleted using kill-subarray since "kill" function
requires to obtain a valid mdinfo from container_content.

This patch fixes the kill-subarray problem by allowing to obtain
mdinfo of all volumes types including unsupported and introducing new
array.status flags.

There are following changes:

1. Added MD_SB_BLOCK_VOLUME for blocking an array, other arrays in the
   container can be activated.

2. Added MD_SB_BLOCK_CONTAINER_RESHAPE block container wide reshapes
   (like changing disk numbers in arrays).

3. IMSM container_content handler is to load mdinfo for all volumes
   and set both blocking flags in array.state field in mdinfo of
   unsupported volumes.  In case of some errors, all volumes can be
   affected. Only blocked array is not activated (also reshaped as
   result). The container wide reshapes are also blocked since by
   metadata definition they require modifications of both arrays.

4. Incremental_container and Assemble functions check array.state and
   do not activate volumes with blocking bits set.

5. assemble_container_content is changed to check container wide reshapes
   before activating reshapes of assembled containers.

6. Grow_reshape and Grow_continue_command checks blocking bits
   before starting reshapes or continueing (-G --continue) reshapes.

7. kill-subarray ignores array.state info and can remove requested array.

Signed-off-by: Marcin Labun <marcin.labun@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Assemble.c
Grow.c
Incremental.c
md_p.h
mdadm.h
super-intel.c