]> git.ipfire.org Git - thirdparty/mdadm.git/commit - mdadm.h
Add action=spare-same-slot policy.
authorNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:06 +0000 (20:58 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 22 Nov 2010 09:58:06 +0000 (20:58 +1100)
commitd2db30455891a97ac0ac17bb64848de52bfb1566
treedfb02e2a2edd5384c20f534aafc24e257e9eb458
parent625b25071bb6db4d1c019d5bab0344d82d5ae4c4
Add action=spare-same-slot policy.

When "mdadm -I" is given a device with no metadata, mdadm tries to add
it as a 'spare' somewhere based on policy.

This patch changes the behaviour in two ways:

1/ If the device is at a 'path' where a previous device was removed
  from an array or container, then we preferentially add the spare to
  that array or container.

2/ Previously only 'bare' devices were considered for adding as
  spares.  Now if action=spare-same-slot is active, we will add
  non-bare devices, but *only* if the path was previously in use
  for some array, and the device will only be added to that array.

Based on code
  From: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>

Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Incremental.c
mdadm.h
policy.c