[PATCH 5/5] Consider target only for spare-same-domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



otherwise, matching target will force spare-same-domain regardless of
action that comes in domain.
---
 Incremental.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Incremental.c b/Incremental.c
index e022506..24015ca 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 && 

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux