]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.h
IMSM: Fix problem in mdmon monitor of using removed disk in imsm container.
authorLabun, Marcin <Marcin.Labun@intel.com>
Wed, 15 Dec 2010 04:51:51 +0000 (15:51 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 15 Dec 2010 04:51:51 +0000 (15:51 +1100)
commit1a64be565bb53f6388caa582bd82804890b2c6de
tree4e5dbbbcd485c7bc28f5bfca98bdbd085676386a
parent1d54f2867b928bb1c3374f269599b8cbcb293193
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