]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Monitor: don't add more spares than needed
authorAnna Czarnowska <anna.czarnowska@intel.com>
Fri, 3 Dec 2010 03:11:29 +0000 (14:11 +1100)
committerNeilBrown <neilb@suse.de>
Fri, 3 Dec 2010 03:11:29 +0000 (14:11 +1100)
commite9a2ac028eb66fdc50c079fc9bf03aa4325bcd5f
treee07e987cf6d4b68e8f57717a10d7a3c1cda7773f
parentf0b853063043b2e67521641db4524548841fa530
Monitor: don't add more spares than needed

When we add a spare to a container it takes a while
before it is noticed by mdmon and recovery starts.
During this time the array remains degraded but we don't want to add
any more spares to this container. Therefore we must check container
with degraded array if it doesn't already have a suitable spare.
container_choose_spare is reused with from=to
Domain check is not needed in this situation.

Ping_manager after moving disk is needed to be able to see
newly added disk in container after coming back through the loop.

Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Monitor.c