summaryrefslogtreecommitdiff
path: root/libmultipath
diff options
context:
space:
mode:
authorPeter Gervai <grin@grin.hu>2012-09-30 22:48:37 +0200
committerChristophe Varoqui <christophe.varoqui@opensvc.com>2012-09-30 22:48:37 +0200
commit90b8b4d03c653ddf23221ca5fd8024091411a34b (patch)
treeded658787652c94928560b568278583b0d29c142 /libmultipath
parent050b24b33d3c60e29f7820d2fb75e84a9edde528 (diff)
downloadmultipath-tools-90b8b4d03c653ddf23221ca5fd8024091411a34b.tar.gz
multipath-tools-90b8b4d03c653ddf23221ca5fd8024091411a34b.tar.bz2
multipath-tools-90b8b4d03c653ddf23221ca5fd8024091411a34b.zip
iet prioritizer fix
- revert the path weight allocation : heavy weight for the preferred path, light for others - mention the original author's name - embed a short usage documentation
Diffstat (limited to 'libmultipath')
-rw-r--r--libmultipath/prioritizers/iet.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/libmultipath/prioritizers/iet.c b/libmultipath/prioritizers/iet.c
index 59bdee4..2570b61 100644
--- a/libmultipath/prioritizers/iet.c
+++ b/libmultipath/prioritizers/iet.c
@@ -9,6 +9,22 @@
#include <debug.h>
#include <unistd.h>
+//
+// This prioritizer suits iSCSI needs, makes it possible to prefer one path.
+//
+// (It's a bit of a misnomer since supports the client side [eg. open-iscsi]
+// instead of just "iet".)
+//
+// Usage:
+// prio "iet"
+// prio_args "preferredip=10.11.12.13"
+//
+// Uses /dev/disk/by-path to find the IP of the device.
+// Assigns prio 20 (high) to the preferred IP and prio 10 (low) to the rest.
+//
+// by Olivier Lambert <lambert.olivier.gmail.com>
+//
+
#define dc_log(prio, msg) condlog(prio, "%s: iet prio: " msg, dev)
//
// name: find_regex
@@ -102,7 +118,7 @@ int iet_prio(const char *dev, char * args)
// high prio
free(ip);
closedir(dir_p);
- return 10;
+ return 20;
}
free(ip);
}
@@ -115,7 +131,7 @@ int iet_prio(const char *dev, char * args)
}
// nothing found, low prio
closedir(dir_p);
- return 20;
+ return 10;
}
int getprio(struct path * pp, char * args)