]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm: drop get_disk_controller_domain()
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Thu, 29 Feb 2024 11:52:16 +0000 (12:52 +0100)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Mon, 11 Mar 2024 10:09:39 +0000 (11:09 +0100)
This function is unused now. Drop it.
Controller for IMSM is a device policy and is separated from user defined
domains.

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

diff --git a/mdadm.h b/mdadm.h
index cfa11391415ab41fdc6c1f45e6360b10aecf8575..3fedca484bddb34aacc3565600d844a73f22174c 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -1286,21 +1286,6 @@ extern struct superswitch {
         */
        struct mdinfo *(*activate_spare)(struct active_array *a,
                                         struct metadata_update **updates);
-       /*
-        * Return statically allocated string that represents metadata specific
-        * controller domain of the disk. The domain is used in disk domain
-        * matching functions. Disks belong to the same domain if the they have
-        * the same domain from mdadm.conf and belong the same metadata domain.
-        * Returning NULL or not providing this handler means that metadata
-        * does not distinguish the differences between disks that belong to
-        * different controllers. They are in the domain specified by
-        * configuration file (mdadm.conf).
-        * In case when the metadata has the notion of domains based on disk
-        * it shall return NULL for disks that do not belong to the controller
-        * the supported domains. Such disks will form another domain and won't
-        * be mixed with supported ones.
-        */
-       const char *(*get_disk_controller_domain)(const char *path);
 
        /* for external backup area */
        int (*recover_backup)(struct supertype *st, struct mdinfo *info);
index 4b85f62d967564172e09ce69d5302d48a91bbd07..404f9b5dd347b45d3cc388640cbfdc6faec4c6d8 100644 (file)
--- a/policy.c
+++ b/policy.c
@@ -365,7 +365,6 @@ struct dev_policy *path_policy(char **paths, char *type)
 {
        struct pol_rule *rules;
        struct dev_policy *pol = NULL;
-       int i;
 
        rules = config_rules;
 
@@ -380,18 +379,6 @@ struct dev_policy *path_policy(char **paths, char *type)
                rules = rules->next;
        }
 
-       /* Now add any metadata-specific internal knowledge
-        * about this path
-        */
-       for (i=0; paths && paths[0] && superlist[i]; i++)
-               if (superlist[i]->get_disk_controller_domain) {
-                       const char *d =
-                               superlist[i]->get_disk_controller_domain(
-                                       paths[0]);
-                       if (d)
-                               pol_new(&pol, pol_domain, d, superlist[i]->name);
-               }
-
        pol_sort(&pol);
        pol_dedup(pol);
        return pol;