[libmultipath] deprecate the default_foo config file options
authorChristophe Varoqui <root@xa-s05.(none)>
Sat, 8 Oct 2005 09:53:31 +0000 (11:53 +0200)
committerChristophe Varoqui <root@xa-s05.(none)>
Sat, 8 Oct 2005 09:53:31 +0000 (11:53 +0200)
These are in the default{} configlet; the prefix was clearly redundant.
Keep the old keyword around for a smooth transition, but undocument them.

ChangeLog
libmultipath/config.c
libmultipath/config.h
libmultipath/dict.c
libmultipath/propsel.c
libmultipath/structs.c
multipath.conf.annotated
multipath.conf.synthetic
path_priority/pp_alua/mpath_prio_alua.8

index 2f19064..e22781c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
        * [multipathd] setsched prio to RT
        * [multipath] massive include cleanup
-       * [multipath] add a "default_prio_callout" keyword
+       * [multipath] add a "prio_callout" keyword
          first user will be SPC-3 ALUA priority field fetcher
          from IBM
        * [multipath] reenable stdout on some error paths
          pathvecs
        * [multipath] push WWID_SIZE to 64 char (scsi_id w/ JBODs)
        * [multipath] add a exit_tool() wrapper fn for runfile unlink
-       * [multipath] add a "default_path_grouping_policy" keyword in the
+       * [multipath] add a "path_grouping_policy" keyword in the
          "defaults" block.
-       * [multipath] add a "default_getuid_callout" keyword in the
+       * [multipath] add a "getuid_callout" keyword in the
          "defaults" block. Now multipath is going to work with JBODs
        * [multipath] fix segfault when pathvec is empty after
          get_pathvec()
index a809bbd..99e6b59 100644 (file)
@@ -336,8 +336,8 @@ free_config (struct config * conf)
        if (conf->udev_dir)
                FREE(conf->udev_dir);
 
-       if (conf->default_selector)
-               FREE(conf->default_selector);
+       if (conf->selector)
+               FREE(conf->selector);
 
        if (conf->default_getuid)
                FREE(conf->default_getuid);
@@ -345,8 +345,8 @@ free_config (struct config * conf)
        if (conf->default_getprio)
                FREE(conf->default_getprio);
 
-       if (conf->default_features)
-               FREE(conf->default_features);
+       if (conf->features)
+               FREE(conf->features);
 
        if (conf->default_hwhandler)
                FREE(conf->default_hwhandler);
@@ -414,8 +414,8 @@ load_config (char * file)
                if (!conf->mptable)
                        goto out;
        }
-       if (conf->default_selector == NULL)
-               conf->default_selector = set_default(DEFAULT_SELECTOR);
+       if (conf->selector == NULL)
+               conf->selector = set_default(DEFAULT_SELECTOR);
 
        if (conf->udev_dir == NULL)
                conf->udev_dir = set_default(DEFAULT_UDEVDIR);
@@ -423,14 +423,14 @@ load_config (char * file)
        if (conf->default_getuid == NULL)
                conf->default_getuid = set_default(DEFAULT_GETUID);
 
-       if (conf->default_features == NULL)
-               conf->default_features = set_default(DEFAULT_FEATURES);
+       if (conf->features == NULL)
+               conf->features = set_default(DEFAULT_FEATURES);
 
        if (conf->default_hwhandler == NULL)
                conf->default_hwhandler = set_default(DEFAULT_HWHANDLER);
 
-       if (!conf->default_selector  || !conf->udev_dir         ||
-           !conf->default_getuid    || !conf->default_features ||
+       if (!conf->selector  || !conf->udev_dir         ||
+           !conf->default_getuid    || !conf->features ||
            !conf->default_hwhandler)
                goto out;
 
index e87f149..2cfc2c4 100644 (file)
@@ -47,7 +47,7 @@ struct config {
        int list;
        int pgpolicy_flag;
        int with_sysfs;
-       int default_selector_args;
+       int selector_args;
        int default_pgpolicy;
        int default_checker_index;
        int dev_type;
@@ -61,10 +61,10 @@ struct config {
 
        char * dev;
        char * udev_dir;
-       char * default_selector;
+       char * selector;
        char * default_getuid;
        char * default_getprio;
-       char * default_features;
+       char * features;
        char * default_hwhandler;
 
        vector mptable;
index 1c306b6..c7c48e4 100644 (file)
@@ -39,9 +39,9 @@ udev_dir_handler(vector strvec)
 static int
 def_selector_handler(vector strvec)
 {
-       conf->default_selector = set_value(strvec);
+       conf->selector = set_value(strvec);
 
-       if (!conf->default_selector)
+       if (!conf->selector)
                return 1;
 
        return 0;
@@ -93,9 +93,9 @@ def_prio_callout_handler(vector strvec)
 static int
 def_features_handler(vector strvec)
 {
-       conf->default_features = set_value(strvec);
+       conf->features = set_value(strvec);
 
-       if (!conf->default_features)
+       if (!conf->features)
                return 1;
 
        return 0;
@@ -631,17 +631,27 @@ init_keywords(void)
        install_keyword_root("defaults", NULL);
        install_keyword("polling_interval", &polling_interval_handler);
        install_keyword("udev_dir", &udev_dir_handler);
+       install_keyword("selector", &def_selector_handler);
+       install_keyword("path_grouping_policy", &def_pgpolicy_handler);
+       install_keyword("getuid_callout", &def_getuid_callout_handler);
+       install_keyword("prio_callout", &def_prio_callout_handler);
+       install_keyword("features", &def_features_handler);
+       install_keyword("path_checker", &def_path_checker_handler);
+       install_keyword("failback", &default_failback_handler);
+       install_keyword("rr_min_io", &def_minio_handler);
+       install_keyword("rr_weight", &def_weight_handler);
+       install_keyword("no_path_retry", &def_no_path_retry_handler);
+
+       /*
+        * deprecated synonyms
+        */
        install_keyword("default_selector", &def_selector_handler);
        install_keyword("default_path_grouping_policy", &def_pgpolicy_handler);
        install_keyword("default_getuid_callout", &def_getuid_callout_handler);
        install_keyword("default_prio_callout", &def_prio_callout_handler);
        install_keyword("default_features", &def_features_handler);
        install_keyword("default_path_checker", &def_path_checker_handler);
-       install_keyword("failback", &default_failback_handler);
-       install_keyword("rr_min_io", &def_minio_handler);
-       install_keyword("rr_weight", &def_weight_handler);
-       install_keyword("no_path_retry", &def_no_path_retry_handler);
-       
+
        install_keyword_root("devnode_blacklist", &blacklist_handler);
        install_keyword("devnode", &ble_handler);
        install_keyword("wwid", &ble_handler);
index 7c006c1..54b6d5d 100644 (file)
@@ -116,7 +116,7 @@ select_selector (struct multipath * mp)
                condlog(3, "selector = %s (controler setting)", mp->selector);
                return 0;
        }
-       mp->selector = conf->default_selector;
+       mp->selector = conf->selector;
        condlog(3, "selector = %s (internal default)", mp->selector);
        return 0;
 }
@@ -140,7 +140,7 @@ select_features (struct multipath * mp)
                condlog(3, "features = %s (controler setting)", mp->features);
                return 0;
        }
-       mp->features = conf->default_features;
+       mp->features = conf->features;
        condlog(3, "features = %s (internal default)", mp->features);
        return 0;
 }
index 7cb489f..e6128f3 100644 (file)
@@ -119,7 +119,7 @@ free_multipath (struct multipath * mpp, int free_paths)
                return;
 
        if (mpp->selector &&
-           mpp->selector != conf->default_selector &&
+           mpp->selector != conf->selector &&
            (!mpp->mpe || (mpp->mpe && mpp->selector != mpp->mpe->selector)) &&
            (!mpp->hwe || (mpp->hwe && mpp->selector != mpp->hwe->selector)))
                FREE(mpp->selector);
@@ -130,7 +130,7 @@ free_multipath (struct multipath * mpp, int free_paths)
                FREE(mpp->alias);
 
        if (mpp->features &&
-           mpp->features != conf->default_features &&
+           mpp->features != conf->features &&
            (!mpp->hwe || (mpp->hwe && mpp->features != mpp->hwe->features)))
                FREE(mpp->features);
 
index 567b225..4acec94 100644 (file)
 #      polling_interval 10
 #
 #      #
-#      # name    : default_selector
+#      # name    : selector
 #      # scope   : multipath
 #      # desc    : the default path selector algorithm to use
 #      #           these algorithms are offered by the kernel multipath target
 #      # values  : "round-robin 0"
 #      # default : "round-robin 0"
 #      #
-#      default_selector        "round-robin 0"
+#      selector        "round-robin 0"
 #
 #      #
-#      # name    : default_path_grouping_policy
+#      # name    : path_grouping_policy
 #      # scope   : multipath
 #      # desc    : the default path grouping policy to apply to unspecified
 #      #           multipaths
 #      # default : multibus
 #      #
-#      default_path_grouping_policy    multibus
+#      path_grouping_policy    multibus
 #
 #      #
-#      # name    : default_getuid_callout
+#      # name    : getuid_callout
 #      # scope   : multipath
 #      # desc    : the default program and args to callout to obtain a unique 
 #      #           path identifier. Absolute path required
 #      # default : /sbin/scsi_id -g -u -s
 #      #
-#      default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
+#      getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
 #
 #      #
-#      # name    : default_prio_callout
+#      # name    : prio_callout
 #      # scope   : multipath
 #      # desc    : the default program and args to callout to obtain a path 
 #      #           priority value. The ALUA bits in SPC-3 provide an
 #      #           exploitable prio value for example. "none" is a valid value
 #      # default : (null)
 #      #
-#      #default_prio_callout   "/bin/true"
+#      #prio_callout   "/bin/true"
 #
 #      #
-#      # name    : default_path_checker
+#      # name    : path_checker
 #      # scope   : multipath & multipathd
 #      # desc    : the default method used to determine the paths' state
 #      # values  : readsector0|tur|emc_clariion|hp_sw|directio
 #      # default : readsector0
 #      #
-#      #default_path_checker   readsector0
+#      #path_checker   readsector0
 #
 #      #
 #      # name    : rr_min_io
@@ -87,7 +87,7 @@
 #      # values  : priorities|uniform
 #      # default : uniform
 #      #
-#      rr_weight               priorities
+#      rr_weight       priorities
 #
 #      #
 #      # name    : failback
 ## default : cciss, fd, hd, md, dm, sr, scd, st, ram, raw, loop
 ##
 #blacklist {
-#        wwid 26353900f02796769
+#       wwid 26353900f02796769
 #      devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
 #      devnode "^hd[a-z][[0-9]*]"
 #      devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
index 2661ca1..9d5552f 100644 (file)
@@ -3,21 +3,21 @@
 ## Uncomment the lines relevent to your environment
 ##
 #defaults {
-#      udev_dir        /dev
-#      polling_interval 10
-#      default_selector        "round-robin 0"
-#      default_path_grouping_policy    multibus
-#      default_getuid_callout  "/sbin/scsi_id -g -u -s /block/%n"
-#      default_prio_callout    "/bin/true"
-#      default_features        "0"
-#      default_path_checker    readsector0
+#      udev_dir                /dev
+#      polling_interval        10
+#      selector                "round-robin 0"
+#      path_grouping_policy    multibus
+#      getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
+#      prio_callout            /bin/true
+#      features                0
+#      path_checker            readsector0
 #      rr_min_io               100
 #      rr_weight               priorities
 #      failback                immediate
 #      no_path_retry           queue
 #}
 #devnode_blacklist {
-#        wwid 26353900f02796769
+#       wwid 26353900f02796769
 #      devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
 #      devnode "^hd[a-z][[0-9]*]"
 #      devnode "^cciss!c[0-9]d[0-9]*[p[0-9]*]"
@@ -34,8 +34,8 @@
 #              no_path_retry           queue
 #      }
 #      multipath {
-#              wwid    1DEC_____321816758474
-#              alias   red
+#              wwid                    1DEC_____321816758474
+#              alias                   red
 #      }
 #}
 #devices {
index f899c85..4843bcd 100644 (file)
@@ -137,7 +137,7 @@ tur
 .B  Notes:
 .IP \(bu 2
 Depending on your default configuration not all keywords are required
-.RB "(e.g. if your " default_path_checker " is set to tur you don't have to"
+.RB "(e.g. if your " path_checker " is set to tur you don't have to"
 .RB "use the " path_checker " statement in the device section)."
 .IP \(bu
 .RB "The entries for " vendor " and " product " must be strings that are 8"