]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super-intel.c
imsm: Allow multiple spares to be collected.
authorAdam Kwolek <adam.kwolek@intel.com>
Fri, 26 Nov 2010 07:08:01 +0000 (08:08 +0100)
committerNeilBrown <neilb@suse.de>
Tue, 30 Nov 2010 02:14:24 +0000 (13:14 +1100)
commit8ba77d32818b6c64e61ab9e1fede9e2485dcf2b2
treef05473b8f4025dc239478395c67e4ff1b936ae3b
parent36988a3ddac7e2e1411dbb0e62944a4ae49d0915
imsm: Allow multiple spares to be collected.

Assumption for spares searching was that after picking new device, it
has to be added to array before next search.  This causes returning
different disk on each call.

When creating a spare list during Online Capacity Expansion, we will
first collect the devices list and then all devices are added to md.
Picked device from spares pool has to be checked against picked
devices so far. If not, the same disk will be returned all the time.
Already picked devices are stored in the list and this list is used
for new devices verification also.

So add an extra arg to imsm_add_spare to hold a list of known
spares to ignore.

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