Skip to contentSkip to conversation

multipath-tools: fix DEFAULT values

PATCH In review Xose Vazquez Perez 2 participants 3 messages Oct 17, 2016 – Oct 19, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: fix DEFAULT values

replace RR_WEIGHT_NONE with DEFAULT_RR_WEIGHT, and define DEFAULT_FLUSH

Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/defaults.h | 1 +
 libmultipath/propsel.c  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
libmultipath/defaults.h +1 -0
index 9bf27d6..d00a86f 100644
@@ -31,6 +31,7 @@
 #define DEFAULT_PRIO		"const"
 #define DEFAULT_PRIO_ARGS	""
 #define DEFAULT_CHECKER		TUR
+#define DEFAULT_FLUSH		FLUSH_DISABLED
 
 #define DEFAULT_CHECKINT	5
 #define MAX_CHECKINT(a)		(a << 2)
libmultipath/propsel.c +2 -2
index 1625990..88a1916 100644
@@ -137,7 +137,7 @@ select_rr_weight (struct config *conf, struct multipath * mp)
 	mp_set_ovr(rr_weight);
 	mp_set_hwe(rr_weight);
 	mp_set_conf(rr_weight);
-	mp_set_default(rr_weight, RR_WEIGHT_NONE);
+	mp_set_default(rr_weight, DEFAULT_RR_WEIGHT);
 out:
 	print_rr_weight(buff, 13, &mp->rr_weight);
 	condlog(3, "%s: rr_weight = %s %s", mp->alias, buff, origin);
@@ -550,7 +550,7 @@ select_flush_on_last_del(struct config *conf, struct multipath *mp)
 	mp_set_ovr(flush_on_last_del);
 	mp_set_hwe(flush_on_last_del);
 	mp_set_conf(flush_on_last_del);
-	mp_set_default(flush_on_last_del, FLUSH_DISABLED);
+	mp_set_default(flush_on_last_del, DEFAULT_FLUSH);
 out:
 	condlog(3, "%s: flush_on_last_del = %s %s", mp->alias,
 		(mp->flush_on_last_del == FLUSH_ENABLED)? "yes" : "no", origin);
Signature · 1 line
2.10.1
#1 lore raw
Quoted 1 line · Xose Vazquez Perez

replace RR_WEIGHT_NONE with DEFAULT_RR_WEIGHT, and define DEFAULT_FLUSH

Sorry, duplicate. Drop one of them.
Thank you.

Quoted 46 lines
Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/defaults.h | 1 +
 libmultipath/propsel.c  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
libmultipath/defaults.h +1 -0
index 9bf27d6..d00a86f 100644
@@ -31,6 +31,7 @@
 #define DEFAULT_PRIO		"const"
 #define DEFAULT_PRIO_ARGS	""
 #define DEFAULT_CHECKER		TUR
+#define DEFAULT_FLUSH		FLUSH_DISABLED
 
 #define DEFAULT_CHECKINT	5
 #define MAX_CHECKINT(a)		(a << 2)
libmultipath/propsel.c +2 -2
index 1625990..88a1916 100644
@@ -137,7 +137,7 @@ select_rr_weight (struct config *conf, struct multipath * mp)
 	mp_set_ovr(rr_weight);
 	mp_set_hwe(rr_weight);
 	mp_set_conf(rr_weight);
-	mp_set_default(rr_weight, RR_WEIGHT_NONE);
+	mp_set_default(rr_weight, DEFAULT_RR_WEIGHT);
 out:
 	print_rr_weight(buff, 13, &mp->rr_weight);
 	condlog(3, "%s: rr_weight = %s %s", mp->alias, buff, origin);
@@ -550,7 +550,7 @@ select_flush_on_last_del(struct config *conf, struct multipath *mp)
 	mp_set_ovr(flush_on_last_del);
 	mp_set_hwe(flush_on_last_del);
 	mp_set_conf(flush_on_last_del);
-	mp_set_default(flush_on_last_del, FLUSH_DISABLED);
+	mp_set_default(flush_on_last_del, DEFAULT_FLUSH);
 out:
 	condlog(3, "%s: flush_on_last_del = %s %s", mp->alias,
 		(mp->flush_on_last_del == FLUSH_ENABLED)? "yes" : "no", origin);
#2 lore raw
In reply to Xose Vazquez Perez

Merged.

Quoted 53 lines · Xose Vazquez Perez

replace RR_WEIGHT_NONE with DEFAULT_RR_WEIGHT, and define DEFAULT_FLUSH

Cc Benjamin Marzinski <[email protected]>
Cc Hannes Reinecke <[email protected]>
Cc Christophe Varoqui <[email protected]>
Cc device-mapper development <[email protected]>
---
 libmultipath/defaults.h | 1 +
 libmultipath/propsel.c  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
libmultipath/defaults.h +1 -0
index 9bf27d6..d00a86f 100644
@@ -31,6 +31,7 @@
 #define DEFAULT_PRIO           "const"
 #define DEFAULT_PRIO_ARGS      ""
 #define DEFAULT_CHECKER                TUR
+#define DEFAULT_FLUSH          FLUSH_DISABLED
 
 #define DEFAULT_CHECKINT       5
 #define MAX_CHECKINT(a)                (a << 2)
libmultipath/propsel.c +1 -1
index 1625990..88a1916 100644
@@ -137,7 +137,7 @@ select_rr_weight (struct config *conf, struct
 multipath * mp)
        mp_set_ovr(rr_weight);
        mp_set_hwe(rr_weight);
        mp_set_conf(rr_weight);
-       mp_set_default(rr_weight, RR_WEIGHT_NONE);
+       mp_set_default(rr_weight, DEFAULT_RR_WEIGHT);
 out:
        print_rr_weight(buff, 13, &mp->rr_weight);
        condlog(3, "%s: rr_weight = %s %s", mp->alias, buff, origin);
libmultipath/propsel.c +1 -1
@@ -550,7 +550,7 @@ select_flush_on_last_del(struct config *conf, struct
 multipath *mp)
        mp_set_ovr(flush_on_last_del);
        mp_set_hwe(flush_on_last_del);
        mp_set_conf(flush_on_last_del);
-       mp_set_default(flush_on_last_del, FLUSH_DISABLED);
+       mp_set_default(flush_on_last_del, DEFAULT_FLUSH);
 out:
        condlog(3, "%s: flush_on_last_del = %s %s", mp->alias,
                (mp->flush_on_last_del == FLUSH_ENABLED)? "yes" : "no",

origin);
--
2.10.1