From 90b8b4d03c653ddf23221ca5fd8024091411a34b Mon Sep 17 00:00:00 2001 From: Peter Gervai Date: Sun, 30 Sep 2012 22:48:37 +0200 Subject: [PATCH] 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 --- libmultipath/prioritizers/iet.c | 20 ++++++++++++++++++-- 1 file 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 #include +// +// 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 +// + #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) -- 2.34.1