From fee6a49ee80d1c93f7345eb3420abd229438794f Mon Sep 17 00:00:00 2001 From: Przemyslaw Czarnowski Date: Sun, 26 Dec 2010 22:38:44 +1100 Subject: Consider target only for spare-same-domain otherwise, matching target will force spare-same-domain regardless of action that comes in domain. Signed-off-by: NeilBrown --- Incremental.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Incremental.c') diff --git a/Incremental.c b/Incremental.c index 90fc3739..4ee19813 100644 --- a/Incremental.c +++ b/Incremental.c @@ -978,7 +978,8 @@ static int array_try_spare(char *devname, int *dfdp, struct dev_policy *pol, * array which matches 'target'. * target is considered only if we deal with degraded array */ - if (target) { + if (target && policy_action_allows(pol, st2->ss->name, + act_spare_same_slot)) { if (strcmp(target->metadata, mp->metadata) == 0 && memcmp(target->uuid, mp->uuid, sizeof(target->uuid)) == 0 && -- cgit v1.2.3