Hello community, here is the log from the commit of package multipath-tools checked in at Mon Oct 27 17:02:51 CET 2008. -------- --- multipath-tools/multipath-tools.changes 2008-09-26 16:27:44.000000000 +0200 +++ /mounts/work_src_done/STABLE/multipath-tools/multipath-tools.changes 2008-10-27 14:42:09.555396000 +0100 @@ -1,0 +2,15 @@ +Mon Oct 27 10:30:18 CET 2008 - hare@suse.de + +- Patches from mainline: + * Increase bindings file lock timeout + * Fixes for 'show paths format' + * Add 'show wildcards' cli cmd + * Add support for IBM storage devices +- fopen() returns NULL on failure (bnc#432598) +- Read verbosity level from configuration file (bnc#388284) +- kpartx -l does not remove it's loop device (bnc#417266) +- Missing fixes for libprio ontap.c (bnc#426975) +- Increase buffer size in find_loop_by_file (bnc#436428) +- Include SCSI device handler modules for initrd (bnc#431877) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- multipath-tools-add-compellent-hwtable-entry multipath-tools-add-IBM-storage-to-hwtable multipath-tools-add-show-status-cmd multipath-tools-add-show-wildcards-cmd multipath-tools-fixes-for-show-paths-format multipath-tools-fopen-returns-NULL multipath-tools-include-device-handler-modules multipath-tools-increase-bindings-file-lock-timeout multipath-tools-increase-loop-buffer-size multipath-tools-kpartx-doesnt-remove-loop-device multipath-tools-missing-fixes-for-ontap multipath-tools-read-verbosity-level-from-conf ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ multipath-tools.spec ++++++ --- /var/tmp/diff_new_pack.B27531/_old 2008-10-27 17:02:25.000000000 +0100 +++ /var/tmp/diff_new_pack.B27531/_new 2008-10-27 17:02:25.000000000 +0100 @@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq coreutils grep diffutils AutoReqProv: on Version: 0.4.8 -Release: 21 +Release: 22 Summary: Tools to Manage Multipathed Devices with the device-mapper Source: multipath-tools-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -36,6 +36,18 @@ Patch2: %{name}-sles11-alpha3-update Patch3: %{name}-check-get_inq-return-values Patch4: %{name}-implement-map-resize +Patch5: %{name}-add-show-status-cmd +Patch6: %{name}-add-compellent-hwtable-entry +Patch7: %{name}-increase-bindings-file-lock-timeout +Patch8: %{name}-fixes-for-show-paths-format +Patch9: %{name}-add-show-wildcards-cmd +Patch10: %{name}-fopen-returns-NULL +Patch11: %{name}-read-verbosity-level-from-conf +Patch12: %{name}-kpartx-doesnt-remove-loop-device +Patch13: %{name}-missing-fixes-for-ontap +Patch14: %{name}-add-IBM-storage-to-hwtable +Patch15: %{name}-increase-loop-buffer-size +Patch16: %{name}-include-device-handler-modules %description This package provides the tools to manage multipathed devices by @@ -81,6 +93,18 @@ %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 %build make OPTFLAGS="$RPM_OPT_FLAGS" @@ -142,10 +166,22 @@ %{_mandir}/man8/kpartx.8* %changelog +* Mon Oct 27 2008 hare@suse.de +- Patches from mainline: + * Increase bindings file lock timeout + * Fixes for 'show paths format' + * Add 'show wildcards' cli cmd + * Add support for IBM storage devices +- fopen() returns NULL on failure (bnc#432598) +- Read verbosity level from configuration file (bnc#388284) +- kpartx -l does not remove it's loop device (bnc#417266) +- Missing fixes for libprio ontap.c (bnc#426975) +- Increase buffer size in find_loop_by_file (bnc#436428) +- Include SCSI device handler modules for initrd (bnc#431877) * Fri Sep 26 2008 hare@suse.de - Implement map resize (FATE#302007) - Handle cciss devices correctly (bnc#419123) -* Thu Sep 25 2008 ro@suse.de +* Wed Sep 24 2008 ro@suse.de - use udevadm info instead of udevinfo * Wed Sep 03 2008 hare@suse.de - Merge in fixes from upstream: ++++++ multipath-tools-add-compellent-hwtable-entry ++++++
From af9e485cddb49d75d89f438c1f0f5ac27802e1e5 Mon Sep 17 00:00:00 2001 From: Jim Lester
Date: Sun, 21 Sep 2008 12:36:33 +0200 Subject: [PATCH] [lib] new hardware from compellent in defaults table
--- libmultipath/hwtable.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index ada5c55..3e33352 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -18,6 +18,27 @@ */ static struct hwentry default_hw[] = { /* + * Compellent Technologies, Inc. + * + * Maintainer : Jim Lester, Compellent + * Mail : jim.lester@compellent.com + */ + { + .vendor = "COMPELNT", + .product = "Compellent Vol", + .getuid = DEFAULT_GETUID, + .features = DEFAULT_FEATURES, + .hwhandler = DEFAULT_HWHANDLER, + .selector = DEFAULT_SELECTOR, + .pgpolicy = MULTIBUS, + .pgfailback = -FAILBACK_IMMEDIATE, + .rr_weight = RR_WEIGHT_NONE, + .no_path_retry = NO_PATH_RETRY_QUEUE, + .minio = DEFAULT_MINIO, + .checker_name = TUR, + .prio_name = DEFAULT_PRIO, + }, + /* * Apple controller family * * Maintainer : Shyam Sundar -- 1.5.2.4 ++++++ multipath-tools-add-IBM-storage-to-hwtable ++++++
From b0ce6c618b0953b708f4810e763ce307f1bad590 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Mon, 20 Oct 2008 08:49:04 +0200 Subject: [PATCH] Add support for couple of IBM storage devices
Few of the IBM rdac storage devices are not available in the multipath
tools. This patch adds support for those.
Signed-Off-by: Chandra Seetharaman
From 88eb616ae1a673127ef4fd995d703a8b46a63822 Mon Sep 17 00:00:00 2001 From: Christophe Varoqui
Date: Thu, 11 Sep 2008 00:17:37 +0200 Subject: [PATCH] [multipathd] add "show status" cli command
For now just print the number of paths in each path checker state,
if not zero. For example :
path checker states:
up 2
down 1
ghost 1
---
libmultipath/checkers.c | 15 +++++++++++++++
libmultipath/checkers.h | 18 +++++++++++-------
libmultipath/print.c | 24 ++++++++++++++++++++++++
libmultipath/print.h | 1 +
libmultipath/structs.c | 2 +-
multipathd/cli.c | 1 +
multipathd/cli_handlers.c | 30 ++++++++++++++++++++++++++++++
multipathd/cli_handlers.h | 1 +
multipathd/main.c | 4 +++-
9 files changed, 87 insertions(+), 9 deletions(-)
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
index 5889ad7..5132081 100644
--- a/libmultipath/checkers.c
+++ b/libmultipath/checkers.c
@@ -8,8 +8,23 @@
#include "vector.h"
#include "config.h"
+char *checker_state_names[] = {
+ "wild",
+ "unchecked",
+ "down",
+ "up",
+ "shaky",
+ "ghost",
+ "pending"
+};
+
static LIST_HEAD(checkers);
+char * checker_state_name (int i)
+{
+ return checker_state_names[i];
+}
+
int init_checkers (void)
{
INIT_LIST_HEAD(&checkers);
diff --git a/libmultipath/checkers.h b/libmultipath/checkers.h
index a65aaf9..e735250 100644
--- a/libmultipath/checkers.h
+++ b/libmultipath/checkers.h
@@ -47,13 +47,16 @@
* - Use: All async checkers
* - Description: Indicates a check IO is in flight.
*/
-#define PATH_WILD -1
-#define PATH_UNCHECKED 0
-#define PATH_DOWN 1
-#define PATH_UP 2
-#define PATH_SHAKY 3
-#define PATH_GHOST 4
-#define PATH_PENDING 5
+enum path_check_state {
+ PATH_WILD,
+ PATH_UNCHECKED,
+ PATH_DOWN,
+ PATH_UP,
+ PATH_SHAKY,
+ PATH_GHOST,
+ PATH_PENDING,
+ PATH_MAX_STATE
+};
#define DIRECTIO "directio"
#define TUR "tur"
@@ -106,6 +109,7 @@ struct checker {
#define MSG(c, fmt, args...) snprintf((c)->message, CHECKER_MSG_LEN, fmt, ##args);
+char * checker_state_name (int);
int init_checkers (void);
struct checker * add_checker (char *);
struct checker * checker_lookup (char *);
diff --git a/libmultipath/print.c b/libmultipath/print.c
index 08ebd51..459b973 100644
--- a/libmultipath/print.c
+++ b/libmultipath/print.c
@@ -1133,6 +1133,30 @@ snprint_blacklist_except (char * buff, int len)
}
extern int
+snprint_status (char * buff, int len, struct vectors *vecs)
+{
+ int fwd = 0;
+ int i;
+ unsigned int count[PATH_MAX_STATE] = {0};
+ struct path * pp;
+
+ vector_foreach_slot (vecs->pathvec, pp, i) {
+ count[pp->state]++;
+ }
+ fwd += snprintf(buff + fwd, len - fwd, "path checker states:\n");
+ for (i=0; i
From 27ec49eca021f1cc85e66d55509f1e051a820bd4 Mon Sep 17 00:00:00 2001 From: Christophe Varoqui
Date: Mon, 29 Sep 2008 01:37:02 +0200 Subject: [PATCH] [multipathd] add "show wildcards" cli command
The fact I had to look at the code to find the wildcards to use in "show paths format ...", "show multipath format ..." and "show pathgroup format ..." was a clear sign that more help was necessary. The "show wildcards" command outputs : multipath format wildcards: %n name %w uuid %d sysfs %F failback %Q queueing %N paths %r write_prot %t dm-st %S size %f features %h hwhandler %A action %0 path_faults %1 switch_grp %2 map_loads %3 total_q_time %4 q_timeouts %s vend/prod/rev path format wildcards: %w uuid %i hcil %d dev %D dev_t %t dm_st %T chk_st %s vend/prod/rev %C next_check %p pri %S size pathgroup format wildcards: %s selector %p pri %t dm_st And for example, "show paths format foo:%d:%S:%i", outs foo:dev:size:hcil foo:sda:149G:2:0:0:0 --- libmultipath/print.c | 21 +++++++++++++++++++++ libmultipath/print.h | 1 + multipathd/cli.c | 2 ++ multipathd/cli.h | 2 ++ multipathd/cli_handlers.c | 17 +++++++++++++++++ multipathd/cli_handlers.h | 1 + multipathd/main.c | 1 + 7 files changed, 45 insertions(+), 0 deletions(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 7411ccc..09b3579 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -436,8 +436,29 @@ struct pathgroup_data pgd[] = { {'s', "selector", 0, snprint_pg_selector}, {'p', "pri", 0, snprint_pg_pri}, {'t', "dm_st", 0, snprint_pg_state}, + {0, NULL, 0 , NULL} }; +int +snprint_wildcards (char * buff, int len) +{ + int i, fwd = 0; + + fwd += snprintf(buff + fwd, len - fwd, "multipath format wildcards:\n"); + for (i = 0; mpd[i].header; i++) + fwd += snprintf(buff + fwd, len - fwd, "%%%c %s\n", + mpd[i].wildcard, mpd[i].header); + fwd += snprintf(buff + fwd, len - fwd, "\npath format wildcards:\n"); + for (i = 0; pd[i].header; i++) + fwd += snprintf(buff + fwd, len - fwd, "%%%c %s\n", + pd[i].wildcard, pd[i].header); + fwd += snprintf(buff + fwd, len - fwd, "\npathgroup format wildcards:\n"); + for (i = 0; pgd[i].header; i++) + fwd += snprintf(buff + fwd, len - fwd, "%%%c %s\n", + pgd[i].wildcard, pgd[i].header); + return fwd; +} + void get_path_layout (vector pathvec, int header) { diff --git a/libmultipath/print.h b/libmultipath/print.h index 1718c94..a8be408 100644 --- a/libmultipath/print.h +++ b/libmultipath/print.h @@ -44,6 +44,7 @@ int snprint_defaults (char *, int); int snprint_blacklist (char *, int); int snprint_blacklist_except (char *, int); int snprint_blacklist_report (char *, int); +int snprint_wildcards (char *, int); int snprint_status (char *, int, struct vectors *); int snprint_devices (char *, int, struct vectors *); int snprint_hwtable (char *, int, vector); diff --git a/multipathd/cli.c b/multipathd/cli.c index 051624a..34ae07c 100644 --- a/multipathd/cli.c +++ b/multipathd/cli.c @@ -170,6 +170,7 @@ load_keys (void) r += add_key(keys, "blacklist", BLACKLIST, 0); r += add_key(keys, "devices", DEVICES, 0); r += add_key(keys, "format", FMT, 1); + r += add_key(keys, "wildcards", WILDCARDS, 0); if (r) { free_keys(keys); @@ -416,6 +417,7 @@ cli_init (void) { add_handler(LIST+CONFIG, NULL); add_handler(LIST+BLACKLIST, NULL); add_handler(LIST+DEVICES, NULL); + add_handler(LIST+WILDCARDS, NULL); add_handler(ADD+PATH, NULL); add_handler(DEL+PATH, NULL); add_handler(ADD+MAP, NULL); diff --git a/multipathd/cli.h b/multipathd/cli.h index 8c83eab..9932d96 100644 --- a/multipathd/cli.h +++ b/multipathd/cli.h @@ -20,6 +20,7 @@ enum { __BLACKLIST, __DEVICES, __FMT, + __WILDCARDS, }; #define LIST (1 << __LIST) @@ -43,6 +44,7 @@ enum { #define BLACKLIST (1 << __BLACKLIST) #define DEVICES (1 << __DEVICES) #define FMT (1 << __FMT) +#define WILDCARDS (1 << __WILDCARDS) #define INITIAL_REPLY_LEN 1000 diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c index 415f865..36a4968 100644 --- a/multipathd/cli_handlers.c +++ b/multipathd/cli_handlers.c @@ -224,6 +224,23 @@ cli_list_maps_topology (void * v, char ** reply, int * len, void * data) } int +cli_list_wildcards (void * v, char ** reply, int * len, void * data) +{ + char * c; + + *reply = MALLOC(INITIAL_REPLY_LEN); + + if (!reply) + return 1; + + c = *reply; + c += snprint_wildcards(c, INITIAL_REPLY_LEN); + + *len = INITIAL_REPLY_LEN; + return 0; +} + +int show_status (char ** r, int *len, struct vectors * vecs) { char * c; diff --git a/multipathd/cli_handlers.h b/multipathd/cli_handlers.h index cfc4b12..703a925 100644 --- a/multipathd/cli_handlers.h +++ b/multipathd/cli_handlers.h @@ -9,6 +9,7 @@ int cli_list_maps_topology (void * v, char ** reply, int * len, void * data); int cli_list_config (void * v, char ** reply, int * len, void * data); int cli_list_blacklist (void * v, char ** reply, int * len, void * data); int cli_list_devices (void * v, char ** reply, int * len, void * data); +int cli_list_wildcards (void * v, char ** reply, int * len, void * data); int cli_add_path (void * v, char ** reply, int * len, void * data); int cli_del_path (void * v, char ** reply, int * len, void * data); int cli_add_map (void * v, char ** reply, int * len, void * data); diff --git a/multipathd/main.c b/multipathd/main.c index e57a3e4..84fb5c4 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -703,6 +703,7 @@ uxlsnrloop (void * ap) set_handler_callback(LIST+CONFIG, cli_list_config); set_handler_callback(LIST+BLACKLIST, cli_list_blacklist); set_handler_callback(LIST+DEVICES, cli_list_devices); + set_handler_callback(LIST+WILDCARDS, cli_list_wildcards); set_handler_callback(ADD+PATH, cli_add_path); set_handler_callback(DEL+PATH, cli_del_path); set_handler_callback(ADD+MAP, cli_add_map); -- 1.5.2.4 ++++++ multipath-tools-fixes-for-show-paths-format ++++++
From 244454da2d4f3cb5d197a6b0e6fc2b4c8d72d08c Mon Sep 17 00:00:00 2001 From: Christophe Varoqui
Date: Mon, 29 Sep 2008 00:44:46 +0200 Subject: [PATCH] [libmultipath] fixes for "show paths format"
o undue 1-char rollback when encountering unknown wildcard o fix segfault when format starts with an unknown wildard o continue parsing the format after an unknown wildcard --- libmultipath/print.c | 33 +++++++++++++-------------------- 1 files changed, 13 insertions(+), 20 deletions(-) diff --git a/libmultipath/print.c b/libmultipath/print.c index 459b973..7411ccc 100644 --- a/libmultipath/print.c +++ b/libmultipath/print.c @@ -28,6 +28,9 @@ #define NOPAD s = c #define PAD(x) while ((int)(c - s) < (x) && (c < (line + len - 1))) \ *c++ = ' '; s = c +#define ENDLINE \ + if (c > line) \ + line[c - line - 1] = '\n' #define PRINT(var, size, format, args...) \ fwd = snprintf(var, size, format, ##args); \ c += (fwd >= size) ? size : fwd; @@ -532,15 +535,13 @@ snprint_multipath_header (char * line, int len, char * format) f++; if (!(data = mpd_lookup(*f))) - break; /* unknown wildcard */ + continue; /* unknown wildcard */ PRINT(c, TAIL, data->header); PAD(data->width); } while (*f++); - line[c - line - 1] = '\n'; - line[c - line] = '\0'; - + ENDLINE; return (c - line); } @@ -567,7 +568,7 @@ snprint_multipath (char * line, int len, char * format, f++; if (!(data = mpd_lookup(*f))) - break; + continue; data->snprint(buff, MAX_FIELD_LEN, mpp); PRINT(c, TAIL, buff); @@ -575,9 +576,7 @@ snprint_multipath (char * line, int len, char * format, buff[0] = '\0'; } while (*f++); - line[c - line - 1] = '\n'; - line[c - line] = '\0'; - + ENDLINE; return (c - line); } @@ -602,15 +601,13 @@ snprint_path_header (char * line, int len, char * format) f++; if (!(data = pd_lookup(*f))) - break; /* unknown wildcard */ + continue; /* unknown wildcard */ PRINT(c, TAIL, data->header); PAD(data->width); } while (*f++); - line[c - line - 1] = '\n'; - line[c - line] = '\0'; - + ENDLINE; return (c - line); } @@ -637,16 +634,14 @@ snprint_path (char * line, int len, char * format, f++; if (!(data = pd_lookup(*f))) - break; + continue; data->snprint(buff, MAX_FIELD_LEN, pp); PRINT(c, TAIL, buff); PAD(data->width); } while (*f++); - line[c - line - 1] = '\n'; - line[c - line] = '\0'; - + ENDLINE; return (c - line); } @@ -673,16 +668,14 @@ snprint_pathgroup (char * line, int len, char * format, f++; if (!(data = pgd_lookup(*f))) - break; + continue; data->snprint(buff, MAX_FIELD_LEN, pgp); PRINT(c, TAIL, buff); PAD(data->width); } while (*f++); - line[c - line - 1] = '\n'; - line[c - line] = '\0'; - + ENDLINE; return (c - line); } -- 1.5.2.4 ++++++ multipath-tools-fopen-returns-NULL ++++++
From 3cf5b5aaa64e673364e8758640e5d5434425235b Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Thu, 9 Oct 2008 12:53:38 +0200 Subject: [PATCH] fopen returns NULL on failure, not -1
References: 432598
Signed-off-by: Hannes Reinecke
From 669b5c11d8c82252f9697e35d183a0c840386261 Mon Sep 17 00:00:00 2001 From: Dave Wysochanski
Date: Sun, 28 Sep 2008 22:32:29 +0200 Subject: [PATCH] [lib] Increase bindings file lock timeout to avoid failure of user_friendly_names
On setups with a large number of paths / multipath maps, contention for the advisory lock on the bindings file may take longer than 3 seconds, and some multipath processes may create maps based on WWID despite having user_friendly_names set. Increasing the timeout is a simple fix that gets us a bit further. --- libmultipath/alias.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libmultipath/alias.h b/libmultipath/alias.h index 3d64b9b..fe1191b 100644 --- a/libmultipath/alias.h +++ b/libmultipath/alias.h @@ -1,4 +1,4 @@ -#define BINDINGS_FILE_TIMEOUT 3 +#define BINDINGS_FILE_TIMEOUT 30 #define BINDINGS_FILE_HEADER \ "# Multipath bindings, Version : 1.0\n" \ "# NOTE: this file is automatically maintained by the multipath program.\n" \ -- 1.5.2.4 ++++++ multipath-tools-increase-loop-buffer-size ++++++
From 18903014d3e6402909e709fedaf669d2a55c1490 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Tue, 21 Oct 2008 10:22:16 +0200 Subject: [PATCH] Increase buffer size in find_loop_by_file()
find_loop_by_file() uses an internal buffer of 20 chars, which is compared
to a buffer of the size of 64 chars. Not good.
References: 436428
Signed-off-by: Hannes Reinecke
From 67f0f96ae532f8fda862576fba6f718809ade128 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Tue, 14 Oct 2008 08:38:29 +0200 Subject: [PATCH] kpartx -l does not remove it's loop device
When doing a kpartx -l it does not remove it's loop device when done.
The appended patch to multipath-tools could fix this.
References: 417266
Signed-off-by: Philipp Zimmer
From 375c38b4f4aa88fddd6106e4f2722e120fc1dac4 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Wed, 15 Oct 2008 13:44:00 +0200 Subject: [PATCH] Missing fixes for libprio ontap.c
The ontap.c libprio source file available on SLES10 SP2 has a few
deviations from the corresponding pp_ontap.c source file in the
path_priority directory.
References: 426975
Signed-off-by: Martin George
From 965522c700ea307029789a1485242835132cea77 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke
Date: Tue, 14 Oct 2008 08:21:02 +0200 Subject: [PATCH] Read the verbosity level from multipath.conf configuration file
With this patch, multipathd can read the verbosity level from
the multipath.conf configuration file.
For example:
verbosity 5
References: 388284
Signed-off-by: Ritesh Raj Sarraf