]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Revert "policy.c: Avoid to take spare without defined domain by imsm"
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Thu, 29 Feb 2024 11:52:17 +0000 (12:52 +0100)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Mon, 11 Mar 2024 10:09:50 +0000 (11:09 +0100)
This reverts commit 3bf9495270d7 ("policy.c: Avoid to take spare without
defined domain by imsm").

IMSM does not require to be special now because it doesn't create disk
controller domain.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
policy.c

index 404f9b5dd347b45d3cc388640cbfdc6faec4c6d8..dfaafdc07cdcd73af6e810f09d258b42ff8909bb 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -759,7 +759,6 @@ int domain_test(struct domainlist *dom, struct dev_policy *pol,
         *  1:  has domains, all match
         */
        int found_any = -1;
-       int has_one_domain = 1;
        struct dev_policy *p;
 
        pol = pol_find(pol, pol_domain);
@@ -769,9 +768,6 @@ int domain_test(struct domainlist *dom, struct dev_policy *pol,
                        dom = dom->next;
                if (!dom || strcmp(dom->dom, p->value) != 0)
                        return 0;
-               if (has_one_domain && metadata && strcmp(metadata, "imsm") == 0)
-                       found_any = -1;
-               has_one_domain = 0;
        }
        return found_any;
 }