]> git.ipfire.org Git - thirdparty/mdadm.git/commit
block monitor: freeze spare assignment for external arrays
authorDan Williams <dan.j.williams@intel.com>
Tue, 23 Nov 2010 04:00:54 +0000 (15:00 +1100)
committerNeilBrown <neilb@suse.de>
Tue, 23 Nov 2010 04:00:54 +0000 (15:00 +1100)
commitbc77ed535db05fc4b5b46f20dc4c27893f01610d
tree92a86d4a598897adc3815935120a39ab1d26bc1b
parente5408a3202c09267f780d53334c369793534a7e8
block monitor: freeze spare assignment for external arrays

In order to support reshape and atomic removal of spares from containers
we need to prevent mdmon from activating spares.  In the reshape case we
additionally need to freeze sync_action while the reshape transaction is
initiated with the kernel and recorded in the metadata.

When reshaping a raid0 array we need to freeze the array *before* it is
transitioned to a redundant raid level.  Since sync_action does not exist
at this point we extend the '-' prefix of a subarray string to flag
mdmon not to activate spares.

Mdadm needs to be reasonably certain that the version of mdmon in the
system honors this 'freeze' indication.  If mdmon is not already active
then we assume the version that gets started is the same as the mdadm
version.  Otherwise, we check the version of mdmon as returned by the
extended ping_monitor() operation.  This is to catch cases where mdadm
is upgraded in the filesystem, but mdmon started in the initramfs is
from a previous release.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
ReadMe.c
managemon.c
mdadm.h
msg.c
msg.h
sysfs.c
util.c