[dm-devel] [PATCH 23/33] libmultipath: disassemble_map: treat minio like assemble_map does
Martin Wilck
mwilck at suse.com
Tue Feb 28 16:23:19 UTC 2017
From: Martin Wilck <mwilck at suse.de>
Rather than using 0 for everything except round-robin, read back
the actual minio value from DM.
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
libmultipath/dmparser.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
index 4940e8cf..469e60d2 100644
--- a/libmultipath/dmparser.c
+++ b/libmultipath/dmparser.c
@@ -392,19 +392,17 @@ int disassemble_map(vector pathvec, char *params, struct multipath *mpp,
for (k = 0; k < num_paths_args; k++)
if (k == 0) {
+ p += get_word(p, &word);
+ def_minio = atoi(word);
+ FREE(word);
+
if (!strncmp(mpp->selector,
"round-robin", 11)) {
- p += get_word(p, &word);
- def_minio = atoi(word);
if (mpp->rr_weight == RR_WEIGHT_PRIO
&& pp->priority > 0)
def_minio /= pp->priority;
- FREE(word);
- } else {
- p += get_word(p, NULL);
- def_minio = 0;
}
if (def_minio != mpp->minio)
--
2.11.0
More information about the dm-devel
mailing list