]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
IMSM: Fix problem in mdmon monitor of using removed disk in imsm container.
authorLabun, Marcin <Marcin.Labun@intel.com>
Tue, 15 Mar 2011 04:09:31 +0000 (15:09 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 15 Mar 2011 04:09:31 +0000 (15:09 +1100)
commit258c3e921b5efae10116857971a9a2bfbfe99d4b
tree1dea3736020172e2b678b99036a1d7d0a4f2ef4a
parent33b0edd78ad33207434f2944e81a09a91ddafd10
IMSM: Fix problem in mdmon monitor of using removed disk in imsm container.

Manager thread shall pass the information to monitor thread (mdmon)
that some devices are removed from container.  Otherwise, monitor
(mdmon) might use such devices (spares) to rebuild the array that has
gone degraded.

This problem happens for imsm containers, since a list of the
container disks is maintained in intel_super structure. When array
goes degraded, the list is searched to find a spare disks to start
rebuild.  Without this fix the rebuild could be stared on the spare
device that was a member of the container, but has been removed from
it.

New super type function handler has been introduced to prepare
metadata format specific information about removed devices.

int (*remove_from_super)(struct supertype *st, mdu_disk_info_t *dinfo)

The message prepared in remove_from_super is later processed by
process_update handler in monitor thread.

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