This commit is contained in:
parent
9f25ddf558
commit
262d940415
27
multipath-tools-add-missing-unlock-on-exit
Normal file
27
multipath-tools-add-missing-unlock-on-exit
Normal file
@ -0,0 +1,27 @@
|
||||
From 1feee37da59d67c4a38e01348e7138d4570c1fd4 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 18 Dec 2008 16:20:09 +0100
|
||||
Subject: [PATCH] Add missing unlock() on exit path
|
||||
|
||||
We forgot to unlock the paths on exit.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/configure.c | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
|
||||
index 68178c3..d1e26a1 100644
|
||||
--- a/libmultipath/configure.c
|
||||
+++ b/libmultipath/configure.c
|
||||
@@ -337,6 +337,7 @@ domap (struct multipath * mpp, char * params)
|
||||
|
||||
if (dm_map_present(mpp->alias)) {
|
||||
condlog(3, "%s: map already present", mpp->alias);
|
||||
+ lock_multipath(mpp, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
35
multipath-tools-add-new-MSA-to-hwtable
Normal file
35
multipath-tools-add-new-MSA-to-hwtable
Normal file
@ -0,0 +1,35 @@
|
||||
commit 4faa9b359e4b35882459c45176760ca2b0c8caaa
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu Jan 15 12:03:34 2009 +0100
|
||||
|
||||
Add new HP arrays to internal hardware table
|
||||
|
||||
This patch is to include entries for 2 new HP arrays in the hwtable.
|
||||
|
||||
References: bnc#442133
|
||||
|
||||
Signed-off-by: Vijayakumar Balasubramanian <vijayakumar@hp.com>
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
|
||||
index d742d6d..97c979e 100644
|
||||
--- a/libmultipath/hwtable.c
|
||||
+++ b/libmultipath/hwtable.c
|
||||
@@ -145,7 +145,7 @@ static struct hwentry default_hw[] = {
|
||||
{
|
||||
/* EVA 3000/5000 with new firmware, EVA 4000/6000/8000 */
|
||||
.vendor = "(COMPAQ|HP)",
|
||||
- .product = "HSV1[01]1|HSV2[01]0|HSV300",
|
||||
+ .product = "HSV1[01]1|HSV2[01]0|HSV300|HSV4[05]0",
|
||||
.getuid = DEFAULT_GETUID,
|
||||
.features = DEFAULT_FEATURES,
|
||||
.hwhandler = DEFAULT_HWHANDLER,
|
||||
@@ -177,7 +177,7 @@ static struct hwentry default_hw[] = {
|
||||
{
|
||||
/* HP MSA2000 product family with new firmware */
|
||||
.vendor = "HP",
|
||||
- .product = "MSA2012sa|MSA23(12|24)(fc|i|sa)",
|
||||
+ .product = "MSA2012sa|MSA23(12|24)(fc|i|sa)|MSA2000s VOLUME",
|
||||
.getuid = DEFAULT_GETUID,
|
||||
.features = DEFAULT_FEATURES,
|
||||
.hwhandler = DEFAULT_HWHANDLER,
|
69
multipath-tools-display-checker-name-on-failure
Normal file
69
multipath-tools-display-checker-name-on-failure
Normal file
@ -0,0 +1,69 @@
|
||||
From 2abb4feab7683ba7946a3cf387568de3f7312df3 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 13 Jan 2009 15:28:23 +0100
|
||||
Subject: [PATCH] Checker name is not displayed on failure
|
||||
|
||||
If add_checker() isn't able to locate the checker
|
||||
it won't display the name in free_checker().
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/checkers.c | 5 +++--
|
||||
libmultipath/prio.c | 5 +++--
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
||||
index 4378621..e1789e5 100644
|
||||
--- a/libmultipath/checkers.c
|
||||
+++ b/libmultipath/checkers.c
|
||||
@@ -87,10 +87,12 @@ struct checker * add_checker (char * name)
|
||||
c = alloc_checker();
|
||||
if (!c)
|
||||
return NULL;
|
||||
+ snprintf(c->name, CHECKER_NAME_LEN, "%s", name);
|
||||
snprintf(libname, LIB_CHECKER_NAMELEN, "%s/libcheck%s.so",
|
||||
conf->multipath_dir, name);
|
||||
if (stat(libname,&stbuf) < 0) {
|
||||
- condlog(0,"Invalid checker '%s'", name);
|
||||
+ condlog(0,"Checker '%s' not found in %s",
|
||||
+ name, conf->multipath_dir);
|
||||
goto out;
|
||||
}
|
||||
condlog(3, "loading %s checker", libname);
|
||||
@@ -122,7 +124,6 @@ struct checker * add_checker (char * name)
|
||||
if (!c->free)
|
||||
goto out;
|
||||
|
||||
- snprintf(c->name, CHECKER_NAME_LEN, "%s", name);
|
||||
c->fd = 0;
|
||||
c->sync = 1;
|
||||
list_add(&c->node, &checkers);
|
||||
diff --git a/libmultipath/prio.c b/libmultipath/prio.c
|
||||
index 30e03c2..7508a8a 100644
|
||||
--- a/libmultipath/prio.c
|
||||
+++ b/libmultipath/prio.c
|
||||
@@ -71,10 +71,12 @@ struct prio * add_prio (char * name)
|
||||
p = alloc_prio();
|
||||
if (!p)
|
||||
return NULL;
|
||||
+ snprintf(p->name, PRIO_NAME_LEN, "%s", name);
|
||||
snprintf(libname, LIB_PRIO_NAMELEN, "%s/libprio%s.so",
|
||||
conf->multipath_dir, name);
|
||||
if (stat(libname,&stbuf) < 0) {
|
||||
- condlog(0,"Invalid prioritizer '%s'", name);
|
||||
+ condlog(0,"Prioritizer '%s' not found in %s",
|
||||
+ name, conf->multipath_dir);
|
||||
goto out;
|
||||
}
|
||||
condlog(3, "loading %s prioritizer", libname);
|
||||
@@ -91,7 +93,6 @@ struct prio * add_prio (char * name)
|
||||
condlog(0, "A dynamic linking error occurred: (%s)", errstr);
|
||||
if (!p->getprio)
|
||||
goto out;
|
||||
- snprintf(p->name, PRIO_NAME_LEN, "%s", name);
|
||||
list_add(&p->node, &prioritizers);
|
||||
return p;
|
||||
out:
|
||||
--
|
||||
1.5.3.2
|
||||
|
46
multipath-tools-do-not-reinitialize-prio-and-checker-list
Normal file
46
multipath-tools-do-not-reinitialize-prio-and-checker-list
Normal file
@ -0,0 +1,46 @@
|
||||
From f333a7d0516c053f2acc67c9ecec702e24ffdf44 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 8 Jan 2009 11:44:13 +0100
|
||||
Subject: [PATCH] Do not reinitialize prio and checker list after config init
|
||||
|
||||
init_prio() and init_checker() are called after the config file
|
||||
is read as we have to know the path to the shared libraries.
|
||||
But we should not overwrite any checker or prio information read
|
||||
from the config file.
|
||||
|
||||
References: 464373
|
||||
|
||||
Signed-off-by: Konrad Rzeszutek <konrad@virtualiron.com>
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/checkers.c | 1 -
|
||||
libmultipath/prio.c | 1 -
|
||||
2 files changed, 0 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
||||
index 45ef531..4378621 100644
|
||||
--- a/libmultipath/checkers.c
|
||||
+++ b/libmultipath/checkers.c
|
||||
@@ -28,7 +28,6 @@ char * checker_state_name (int i)
|
||||
|
||||
int init_checkers (void)
|
||||
{
|
||||
- INIT_LIST_HEAD(&checkers);
|
||||
if (!add_checker(DEFAULT_CHECKER))
|
||||
return 1;
|
||||
return 0;
|
||||
diff --git a/libmultipath/prio.c b/libmultipath/prio.c
|
||||
index 5e01f54..30e03c2 100644
|
||||
--- a/libmultipath/prio.c
|
||||
+++ b/libmultipath/prio.c
|
||||
@@ -12,7 +12,6 @@ static LIST_HEAD(prioritizers);
|
||||
|
||||
int init_prio (void)
|
||||
{
|
||||
- INIT_LIST_HEAD(&prioritizers);
|
||||
if (!add_prio(DEFAULT_PRIO))
|
||||
return 1;
|
||||
return 0;
|
||||
--
|
||||
1.6.0.2
|
||||
|
82
multipath-tools-dont-run-checkers-for-blocked-devices
Normal file
82
multipath-tools-dont-run-checkers-for-blocked-devices
Normal file
@ -0,0 +1,82 @@
|
||||
From 23348c651f2c4bc7d41a6aa32957615403cf1533 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 13 Jan 2009 15:32:52 +0100
|
||||
Subject: [PATCH] Don't run checkers or prio for blocked devices
|
||||
|
||||
When a device is in 'blocked' state any I/O to it will be
|
||||
blocked. Hence multipathd will stall when running the
|
||||
path checker until the device is unblocked, leaving the
|
||||
entire mulitpath daemon hanging.
|
||||
So we have to check for the state and _not_ run any
|
||||
checker or prioritizer if the device is blocked.
|
||||
|
||||
References: bnc#464155
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/discovery.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
1 files changed, 35 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index a18a46a..afd247d 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -144,6 +144,7 @@ declare_sysfs_get_str(cutype);
|
||||
declare_sysfs_get_str(vendor);
|
||||
declare_sysfs_get_str(model);
|
||||
declare_sysfs_get_str(rev);
|
||||
+declare_sysfs_get_str(state);
|
||||
|
||||
int
|
||||
sysfs_get_dev (struct sysfs_device * dev, char * buff, size_t len)
|
||||
@@ -688,6 +689,23 @@ get_state (struct path * pp)
|
||||
|
||||
condlog(3, "%s: get_state", pp->dev);
|
||||
|
||||
+ if (pp->bus == SYSFS_BUS_SCSI && pp->sysdev) {
|
||||
+ struct sysfs_device *parent;
|
||||
+ char dev_state[32];
|
||||
+
|
||||
+ /* check device state */
|
||||
+ parent = sysfs_device_get_parent(pp->sysdev);
|
||||
+ if (parent && !strncmp(parent->kernel, "block", 5))
|
||||
+ parent = sysfs_device_get_parent(parent);
|
||||
+ if (parent && !sysfs_get_state(parent, dev_state, 32)) {
|
||||
+ if (!strncmp(dev_state, "blocked", 7)) {
|
||||
+ condlog(3, "%s: device blocked", pp->dev);
|
||||
+ pp->state = PATH_DOWN;
|
||||
+ pp->priority = 0;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
if (!checker_selected(c)) {
|
||||
select_checker(pp);
|
||||
if (!checker_selected(c)) {
|
||||
@@ -714,6 +732,23 @@ get_prio (struct path * pp)
|
||||
if (!pp)
|
||||
return 0;
|
||||
|
||||
+ if (pp->bus == SYSFS_BUS_SCSI && pp->sysdev) {
|
||||
+ struct sysfs_device *parent;
|
||||
+ char dev_state[32];
|
||||
+
|
||||
+ /* check device state */
|
||||
+ parent = sysfs_device_get_parent(pp->sysdev);
|
||||
+ if (parent && !strncmp(parent->kernel, "block", 5))
|
||||
+ parent = sysfs_device_get_parent(parent);
|
||||
+ if (parent && !sysfs_get_state(parent, dev_state, 32)) {
|
||||
+ if (!strncmp(dev_state, "blocked", 7)) {
|
||||
+ condlog(3, "%s: device blocked", pp->dev);
|
||||
+ pp->priority = PRIO_UNDEF;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (!pp->prio) {
|
||||
select_prio(pp);
|
||||
if (!pp->prio) {
|
||||
--
|
||||
1.5.3.2
|
||||
|
136
multipath-tools-enhance-error-for-checkers
Normal file
136
multipath-tools-enhance-error-for-checkers
Normal file
@ -0,0 +1,136 @@
|
||||
From 5974ba6dd190ed7b5633467962c2cd1dd2beb85d Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri, 12 Dec 2008 13:49:30 +0100
|
||||
Subject: [PATCH] Enhanced error for invalid checker or prioritizer
|
||||
|
||||
An invalid checker or prioritizer shouldn't be greeted
|
||||
with the incomprehensible 'A dynamic linking error ...'
|
||||
message. Rather display something sensible here.
|
||||
Oh, and fix up list initialization alloc_X().
|
||||
|
||||
References: 456214
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/checkers.c | 23 +++++++++++++++++------
|
||||
libmultipath/prio.c | 22 +++++++++++++++++-----
|
||||
2 files changed, 34 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
||||
index 2640281..231b408 100644
|
||||
--- a/libmultipath/checkers.c
|
||||
+++ b/libmultipath/checkers.c
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <dlfcn.h>
|
||||
+#include <sys/stat.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "checkers.h"
|
||||
@@ -35,7 +36,12 @@ int init_checkers (void)
|
||||
|
||||
struct checker * alloc_checker (void)
|
||||
{
|
||||
- return zalloc(sizeof(struct checker));
|
||||
+ struct checker *c;
|
||||
+
|
||||
+ c = zalloc(sizeof(struct checker));
|
||||
+ if (c)
|
||||
+ INIT_LIST_HEAD(&c->node);
|
||||
+ return c;
|
||||
}
|
||||
|
||||
void free_checker (struct checker * c)
|
||||
@@ -75,6 +81,7 @@ struct checker * checker_lookup (char * name)
|
||||
struct checker * add_checker (char * name)
|
||||
{
|
||||
char libname[LIB_CHECKER_NAMELEN];
|
||||
+ struct stat stbuf;
|
||||
struct checker * c;
|
||||
char *errstr;
|
||||
|
||||
@@ -83,14 +90,18 @@ struct checker * add_checker (char * name)
|
||||
return NULL;
|
||||
snprintf(libname, LIB_CHECKER_NAMELEN, "%s/libcheck%s.so",
|
||||
conf->multipath_dir, name);
|
||||
+ if (stat(libname,&stbuf) < 0) {
|
||||
+ condlog(0,"Invalid checker '%s'", name);
|
||||
+ goto out;
|
||||
+ }
|
||||
condlog(3, "loading %s checker", libname);
|
||||
c->handle = dlopen(libname, RTLD_NOW);
|
||||
- errstr = dlerror();
|
||||
- if (errstr != NULL)
|
||||
- condlog(0, "A dynamic linking error occurred: (%s)", errstr);
|
||||
- if (!c->handle)
|
||||
+ if (!c->handle) {
|
||||
+ if ((errstr = dlerror()) != NULL)
|
||||
+ condlog(0, "A dynamic linking error occurred: (%s)",
|
||||
+ errstr);
|
||||
goto out;
|
||||
-
|
||||
+ }
|
||||
c->check = (int (*)(struct checker *)) dlsym(c->handle, "libcheck_check");
|
||||
errstr = dlerror();
|
||||
if (errstr != NULL)
|
||||
diff --git a/libmultipath/prio.c b/libmultipath/prio.c
|
||||
index 352e9ca..1b9f51b 100644
|
||||
--- a/libmultipath/prio.c
|
||||
+++ b/libmultipath/prio.c
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <string.h>
|
||||
#include <stddef.h>
|
||||
#include <dlfcn.h>
|
||||
+#include <sys/stat.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "prio.h"
|
||||
@@ -19,7 +20,12 @@ int init_prio (void)
|
||||
|
||||
struct prio * alloc_prio (void)
|
||||
{
|
||||
- return zalloc(sizeof(struct prio));
|
||||
+ struct prio *p;
|
||||
+
|
||||
+ p = zalloc(sizeof(struct prio));
|
||||
+ if (p)
|
||||
+ INIT_LIST_HEAD(&p->node);
|
||||
+ return p;
|
||||
}
|
||||
|
||||
void free_prio (struct prio * p)
|
||||
@@ -59,6 +65,7 @@ struct prio * prio_lookup (char * name)
|
||||
struct prio * add_prio (char * name)
|
||||
{
|
||||
char libname[LIB_PRIO_NAMELEN];
|
||||
+ struct stat stbuf;
|
||||
struct prio * p;
|
||||
char *errstr;
|
||||
|
||||
@@ -67,13 +74,18 @@ struct prio * add_prio (char * name)
|
||||
return NULL;
|
||||
snprintf(libname, LIB_PRIO_NAMELEN, "%s/libprio%s.so",
|
||||
conf->multipath_dir, name);
|
||||
+ if (stat(libname,&stbuf) < 0) {
|
||||
+ condlog(0,"Invalid prioritizer '%s'", name);
|
||||
+ goto out;
|
||||
+ }
|
||||
condlog(3, "loading %s prioritizer", libname);
|
||||
p->handle = dlopen(libname, RTLD_NOW);
|
||||
- errstr = dlerror();
|
||||
- if (errstr != NULL)
|
||||
- condlog(0, "A dynamic linking error occurred: (%s)", errstr);
|
||||
- if (!p->handle)
|
||||
+ if (!p->handle) {
|
||||
+ if ((errstr = dlerror()) != NULL)
|
||||
+ condlog(0, "A dynamic linking error occurred: (%s)",
|
||||
+ errstr);
|
||||
goto out;
|
||||
+ }
|
||||
p->getprio = (int (*)(struct path *)) dlsym(p->handle, "getprio");
|
||||
errstr = dlerror();
|
||||
if (errstr != NULL)
|
||||
--
|
||||
1.6.0.2
|
||||
|
40
multipath-tools-fix-directio-error-messages
Normal file
40
multipath-tools-fix-directio-error-messages
Normal file
@ -0,0 +1,40 @@
|
||||
commit 91b2c44cb23076ec0cb647dc42b438f1583677c7
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed Jan 21 13:26:51 2009 +0100
|
||||
|
||||
Update misleading debug messages for directio checker
|
||||
|
||||
io_getevents returns the number of events received, so '1'
|
||||
is actual a success. And calling 'strerror(errno)' unconditionally
|
||||
here will lead to false errors as the errno value won't be
|
||||
updated then.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
|
||||
index c701609..ecf0dd2 100644
|
||||
--- a/libmultipath/checkers/directio.c
|
||||
+++ b/libmultipath/checkers/directio.c
|
||||
@@ -149,14 +149,19 @@ check_state(int fd, struct directio_context *ct, int sync)
|
||||
ct->running++;
|
||||
|
||||
r = io_getevents(ct->ioctx, 1L, 1L, &event, &timeout);
|
||||
- LOG(3, "async io getevents returns %li (errno=%s)", r, strerror(errno));
|
||||
|
||||
- if (r < 1L) {
|
||||
+ if (r < 0 ) {
|
||||
+ LOG(3, "async io getevents returned %li (errno=%s)", r,
|
||||
+ strerror(errno));
|
||||
+ rc = PATH_UNCHECKED;
|
||||
+ } else if (r < 1L) {
|
||||
if (ct->running > ASYNC_TIMEOUT_SEC || sync) {
|
||||
LOG(3, "abort check on timeout");
|
||||
rc = PATH_DOWN;
|
||||
- } else
|
||||
+ } else {
|
||||
+ LOG(3, "async io pending");
|
||||
rc = PATH_PENDING;
|
||||
+ }
|
||||
} else {
|
||||
LOG(3, "io finished %lu/%lu", event.res, event.res2);
|
||||
ct->running = 0;
|
60
multipath-tools-fix-sysfs_attr_get_value
Normal file
60
multipath-tools-fix-sysfs_attr_get_value
Normal file
@ -0,0 +1,60 @@
|
||||
From 67c3b7d8d0ec6f438d11c02c0ad78041ef67d924 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed, 7 Jan 2009 10:52:25 +0100
|
||||
Subject: [PATCH] Fix sysfs_attr_get_value()
|
||||
|
||||
sysfs_attr_get_value() should return NULL if the attribute was not
|
||||
found or found to be empty. And we should increase the attribute
|
||||
value size to avoid overflows.
|
||||
And overflows should be truncated, not ignored.
|
||||
|
||||
References: bnc#456747
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/structs.h | 2 +-
|
||||
libmultipath/sysfs.c | 8 +++++---
|
||||
2 files changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
|
||||
index 75bd379..8596e8d 100644
|
||||
--- a/libmultipath/structs.h
|
||||
+++ b/libmultipath/structs.h
|
||||
@@ -10,7 +10,7 @@
|
||||
#define CALLOUT_MAX_SIZE 128
|
||||
#define BLK_DEV_SIZE 33
|
||||
#define PATH_SIZE 512
|
||||
-#define NAME_SIZE 128
|
||||
+#define NAME_SIZE 512
|
||||
|
||||
|
||||
#define SCSI_VENDOR_SIZE 9
|
||||
diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c
|
||||
index c0d4d5f..e00a101 100644
|
||||
--- a/libmultipath/sysfs.c
|
||||
+++ b/libmultipath/sysfs.c
|
||||
@@ -445,8 +445,10 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name)
|
||||
close(fd);
|
||||
if (size < 0)
|
||||
goto out;
|
||||
- if (size == sizeof(value))
|
||||
- goto out;
|
||||
+ if (size == sizeof(value)) {
|
||||
+ dbg("overflow in attribute '%s', truncating", path_full);
|
||||
+ size--;
|
||||
+ }
|
||||
|
||||
/* got a valid value, store and return it */
|
||||
value[size] = '\0';
|
||||
@@ -456,7 +458,7 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name)
|
||||
attr->value = attr->value_local;
|
||||
|
||||
out:
|
||||
- return attr->value;
|
||||
+ return attr && attr->value && strlen(attr->value) ? attr->value : NULL;
|
||||
}
|
||||
|
||||
int sysfs_lookup_devpath_by_subsys_id(char *devpath_full, size_t len,
|
||||
--
|
||||
1.6.0.2
|
||||
|
47
multipath-tools-fix-weightedpath-merge-error
Normal file
47
multipath-tools-fix-weightedpath-merge-error
Normal file
@ -0,0 +1,47 @@
|
||||
From 297a4a148a8469e272c6ed0cfb394a38a324fb0b Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri, 12 Dec 2008 14:41:51 +0100
|
||||
Subject: [PATCH] Fix merge error from prio_weightedpath
|
||||
|
||||
Merge error.
|
||||
|
||||
References: 441007
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/dict.c | 19 +++++++++++--------
|
||||
1 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
|
||||
index 9ba3961..09ecf51 100644
|
||||
--- a/libmultipath/dict.c
|
||||
+++ b/libmultipath/dict.c
|
||||
@@ -640,14 +640,17 @@ hw_prio_handler(vector strvec)
|
||||
return 1;
|
||||
temp = buff;
|
||||
|
||||
- while ((result = strsep(&temp, split_char))) {
|
||||
- if (prio_lookup(result)) {
|
||||
- conf->prio_name = STRDUP(result);
|
||||
- if (temp)
|
||||
- conf->prio_arg = STRDUP(temp);
|
||||
- else
|
||||
- conf->prio_arg = NULL;
|
||||
- break;
|
||||
+ while (temp) {
|
||||
+ result = strsep(&temp, split_char);
|
||||
+ if (strcmp(result, "")) {
|
||||
+ if (prio_lookup(result)) {
|
||||
+ hwe->prio_name = STRDUP(result);
|
||||
+ if (temp)
|
||||
+ hwe->prio_arg = STRDUP(temp);
|
||||
+ else
|
||||
+ hwe->prio_arg = NULL;
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
423
multipath-tools-implement-dev_loss_tmo
Normal file
423
multipath-tools-implement-dev_loss_tmo
Normal file
@ -0,0 +1,423 @@
|
||||
From 4c6e3b7eff9825353610bfc3130276e6f5233247 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 13 Jan 2009 16:01:30 +0100
|
||||
Subject: [PATCH] Implement dev_loss_tmo and fast_io_fail_tmo
|
||||
|
||||
When using multipath the 'dev_loss_tmo' and 'fast_io_fail_tmo'
|
||||
settings should be as small as possible to avoid any stalls
|
||||
in multipathd. So we should be able to configure both
|
||||
from within mulitpath.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/config.c | 2 +
|
||||
libmultipath/config.h | 4 +
|
||||
libmultipath/dict.c | 144 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
libmultipath/discovery.c | 104 +++++++++++++++++++++++++++++++
|
||||
libmultipath/discovery.h | 1 +
|
||||
libmultipath/structs_vec.c | 6 ++
|
||||
multipath/multipath.conf.5 | 12 ++++
|
||||
7 files changed, 273 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index 83da6e7..ea7ad99 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -463,6 +463,8 @@ load_config (char * file)
|
||||
conf->dev_type = DEV_NONE;
|
||||
conf->minio = 1000;
|
||||
conf->max_fds = 0;
|
||||
+ conf->dev_loss_tmo = 0;
|
||||
+ conf->fast_io_fail_tmo = 0;
|
||||
conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
|
||||
|
||||
/*
|
||||
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
||||
index fc0e22d..7d23927 100644
|
||||
--- a/libmultipath/config.h
|
||||
+++ b/libmultipath/config.h
|
||||
@@ -29,6 +29,8 @@ struct hwentry {
|
||||
int no_path_retry;
|
||||
int minio;
|
||||
int pg_timeout;
|
||||
+ int dev_loss_tmo;
|
||||
+ int fast_io_fail_tmo;
|
||||
char * bl_product;
|
||||
};
|
||||
|
||||
@@ -67,6 +69,8 @@ struct config {
|
||||
int pg_timeout;
|
||||
int max_fds;
|
||||
int force_reload;
|
||||
+ int dev_loss_tmo;
|
||||
+ int fast_io_fail_tmo;
|
||||
|
||||
char * dev;
|
||||
char * sysfs_dir;
|
||||
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
|
||||
index 09ecf51..ed77000 100644
|
||||
--- a/libmultipath/dict.c
|
||||
+++ b/libmultipath/dict.c
|
||||
@@ -189,6 +189,46 @@ max_fds_handler(vector strvec)
|
||||
}
|
||||
|
||||
static int
|
||||
+def_dev_loss_tmo_handler(vector strvec)
|
||||
+{
|
||||
+ char * buff;
|
||||
+
|
||||
+ buff = set_value(strvec);
|
||||
+
|
||||
+ if (!buff)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (strlen(buff) == 9 &&
|
||||
+ !strcmp(buff, "off"))
|
||||
+ conf->dev_loss_tmo = -1;
|
||||
+ else
|
||||
+ conf->dev_loss_tmo = atoi(buff);
|
||||
+ FREE(buff);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+def_fast_io_fail_tmo_handler(vector strvec)
|
||||
+{
|
||||
+ char * buff;
|
||||
+
|
||||
+ buff = set_value(strvec);
|
||||
+
|
||||
+ if (!buff)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (strlen(buff) == 9 &&
|
||||
+ !strcmp(buff, "off"))
|
||||
+ conf->fast_io_fail_tmo = -1;
|
||||
+ else
|
||||
+ conf->fast_io_fail_tmo = atoi(buff);
|
||||
+ FREE(buff);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
def_weight_handler(vector strvec)
|
||||
{
|
||||
char * buff;
|
||||
@@ -779,6 +819,54 @@ hw_pg_timeout_handler(vector strvec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+hw_dev_loss_tmo_handler(vector strvec)
|
||||
+{
|
||||
+ struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
|
||||
+ char * buff;
|
||||
+
|
||||
+ if (!hwe)
|
||||
+ return 1;
|
||||
+
|
||||
+ buff = set_value(strvec);
|
||||
+
|
||||
+ if (!buff)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (strlen(buff) == 9 &&
|
||||
+ !strcmp(buff, "off"))
|
||||
+ hwe->dev_loss_tmo = -1;
|
||||
+ else
|
||||
+ hwe->dev_loss_tmo = atoi(buff);
|
||||
+ FREE(buff);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+hw_fast_io_fail_tmo_handler(vector strvec)
|
||||
+{
|
||||
+ struct hwentry *hwe = VECTOR_LAST_SLOT(conf->hwtable);
|
||||
+ char * buff;
|
||||
+
|
||||
+ if (!hwe)
|
||||
+ return 1;
|
||||
+
|
||||
+ buff = set_value(strvec);
|
||||
+
|
||||
+ if (!buff)
|
||||
+ return 1;
|
||||
+
|
||||
+ if (strlen(buff) == 9 &&
|
||||
+ !strcmp(buff, "off"))
|
||||
+ hwe->fast_io_fail_tmo = -1;
|
||||
+ else
|
||||
+ hwe->fast_io_fail_tmo = atoi(buff);
|
||||
+ FREE(buff);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* multipaths block handlers
|
||||
*/
|
||||
@@ -1406,6 +1494,36 @@ snprint_hw_path_checker (char * buff, int len, void * data)
|
||||
}
|
||||
|
||||
static int
|
||||
+snprint_hw_dev_loss_tmo (char * buff, int len, void * data)
|
||||
+{
|
||||
+ struct hwentry * hwe = (struct hwentry *)data;
|
||||
+
|
||||
+ if (!hwe->dev_loss_tmo)
|
||||
+ return 0;
|
||||
+ if (hwe->dev_loss_tmo == conf->dev_loss_tmo)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (hwe->dev_loss_tmo < 0)
|
||||
+ return snprintf(buff, len, "off");
|
||||
+ return snprintf(buff, len, "%u", hwe->dev_loss_tmo);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+snprint_hw_fast_io_fail_tmo (char * buff, int len, void * data)
|
||||
+{
|
||||
+ struct hwentry * hwe = (struct hwentry *)data;
|
||||
+
|
||||
+ if (!hwe->fast_io_fail_tmo)
|
||||
+ return 0;
|
||||
+ if (hwe->fast_io_fail_tmo == conf->fast_io_fail_tmo)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (hwe->fast_io_fail_tmo < 0)
|
||||
+ return snprintf(buff, len, "off");
|
||||
+ return snprintf(buff, len, "%u", hwe->fast_io_fail_tmo);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
snprint_def_polling_interval (char * buff, int len, void * data)
|
||||
{
|
||||
if (conf->checkint == DEFAULT_CHECKINT)
|
||||
@@ -1565,6 +1683,28 @@ snprint_max_fds (char * buff, int len, void * data)
|
||||
}
|
||||
|
||||
static int
|
||||
+snprint_def_dev_loss_tmo (char * buff, int len, void * data)
|
||||
+{
|
||||
+ if (!conf->dev_loss_tmo)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (conf->dev_loss_tmo < 0)
|
||||
+ return snprintf(buff, len, "off");
|
||||
+ return snprintf(buff, len, "%d", conf->dev_loss_tmo);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+snprint_def_fast_io_fail_tmo (char * buff, int len, void * data)
|
||||
+{
|
||||
+ if (!conf->fast_io_fail_tmo)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (conf->fast_io_fail_tmo < 0)
|
||||
+ return snprintf(buff, len, "off");
|
||||
+ return snprintf(buff, len, "%d", conf->fast_io_fail_tmo);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
snprint_def_rr_weight (char * buff, int len, void * data)
|
||||
{
|
||||
if (!conf->rr_weight)
|
||||
@@ -1681,6 +1821,8 @@ init_keywords(void)
|
||||
install_keyword("failback", &default_failback_handler, &snprint_def_failback);
|
||||
install_keyword("rr_min_io", &def_minio_handler, &snprint_def_rr_min_io);
|
||||
install_keyword("max_fds", &max_fds_handler, &snprint_max_fds);
|
||||
+ install_keyword("dev_loss_tmo", &def_dev_loss_tmo_handler, &snprint_def_dev_loss_tmo);
|
||||
+ install_keyword("fast_io_fail_tmo", &def_fast_io_fail_tmo_handler, &snprint_def_fast_io_fail_tmo);
|
||||
install_keyword("rr_weight", &def_weight_handler, &snprint_def_rr_weight);
|
||||
install_keyword("no_path_retry", &def_no_path_retry_handler, &snprint_def_no_path_retry);
|
||||
install_keyword("pg_timeout", &def_pg_timeout_handler, &snprint_def_pg_timeout);
|
||||
@@ -1739,6 +1881,8 @@ init_keywords(void)
|
||||
install_keyword("no_path_retry", &hw_no_path_retry_handler, &snprint_hw_no_path_retry);
|
||||
install_keyword("rr_min_io", &hw_minio_handler, &snprint_hw_rr_min_io);
|
||||
install_keyword("pg_timeout", &hw_pg_timeout_handler, &snprint_hw_pg_timeout);
|
||||
+ install_keyword("dev_loss_tmo", &hw_dev_loss_tmo_handler, &snprint_hw_dev_loss_tmo);
|
||||
+ install_keyword("fast_io_fail_tmo", &hw_fast_io_fail_tmo_handler, &snprint_hw_fast_io_fail_tmo);
|
||||
install_sublevel_end();
|
||||
|
||||
install_keyword_root("multipaths", &multipaths_handler);
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index afd247d..6e4ce1e 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -209,6 +209,110 @@ sysfs_get_fc_nodename (struct sysfs_device * dev, char * node,
|
||||
return 1;
|
||||
}
|
||||
|
||||
+int
|
||||
+sysfs_set_fc_values (struct path *pp, int dev_loss_tmo, int fast_io_fail_tmo)
|
||||
+{
|
||||
+ char attr_path[SYSFS_PATH_SIZE];
|
||||
+ char host_path[SYSFS_PATH_SIZE];
|
||||
+ char attr_value[NAME_SIZE];
|
||||
+ DIR *host_dir, *rport_dir;
|
||||
+ struct dirent *host_ent, *rport_ent;
|
||||
+ int host, channel, lun, port, num;
|
||||
+ int rport_channel = -1;
|
||||
+ int rport_id = -1;
|
||||
+
|
||||
+ if (dev_loss_tmo == 0 || fast_io_fail_tmo == 0) {
|
||||
+ condlog(4, "%s: no FC settings", pp->dev);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (safe_sprintf(host_path, "/sys/class/fc_host/host%i/device",
|
||||
+ pp->sg_id.host_no)) {
|
||||
+ condlog(0, "host_path too small");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ if (!(host_dir = opendir(host_path))) {
|
||||
+ condlog(3, "host %d not a FC HBA", pp->sg_id.host_no);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ while (rport_channel < 0 && rport_id < 0 &&
|
||||
+ (host_ent = readdir(host_dir))) {
|
||||
+ if (sscanf(host_ent->d_name, "rport-%d:%d-%d",
|
||||
+ &host, &port, &num) != 3)
|
||||
+ continue;
|
||||
+
|
||||
+ if (host != pp->sg_id.host_no)
|
||||
+ continue;
|
||||
+
|
||||
+ if (safe_sprintf(attr_path, "%s/%s",
|
||||
+ host_path, host_ent->d_name)) {
|
||||
+ condlog(0, "target_path too small");
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (!(rport_dir = opendir(attr_path))) {
|
||||
+ condlog(1, "cannot open rport path '%s'", attr_path);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ while ((rport_ent = readdir(rport_dir))) {
|
||||
+ if (sscanf(rport_ent->d_name, "target%d:%d:%d",
|
||||
+ &host, &channel, &lun) != 3)
|
||||
+ continue;
|
||||
+
|
||||
+ if (host != pp->sg_id.host_no &&
|
||||
+ channel != pp->sg_id.channel &&
|
||||
+ lun != pp->sg_id.scsi_id)
|
||||
+ continue;
|
||||
+
|
||||
+ rport_channel = port;
|
||||
+ rport_id = num;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (rport_channel < 0 && rport_id < 0) {
|
||||
+ condlog(1, "No rport found");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (safe_sprintf(attr_path,
|
||||
+ "/class/fc_remote_ports/rport-%d:%d-%d",
|
||||
+ pp->sg_id.host_no, rport_channel, rport_id)) {
|
||||
+ condlog(0, "attr_path too small");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (dev_loss_tmo < 0)
|
||||
+ sprintf(attr_value, "%d", 0);
|
||||
+ else
|
||||
+ sprintf(attr_value, "%d", dev_loss_tmo);
|
||||
+ num = sysfs_attr_set_value(attr_path, "dev_loss_tmo",
|
||||
+ attr_value, strlen(attr_value));
|
||||
+ if (num > 0)
|
||||
+ condlog(4, "%s: set dev_loss_tmo to %d", pp->dev,
|
||||
+ dev_loss_tmo);
|
||||
+ else
|
||||
+ condlog(4, "%s: failed to set dev_loss_tmo (%d)",
|
||||
+ pp->dev, errno);
|
||||
+
|
||||
+ if (fast_io_fail_tmo < 0)
|
||||
+ sprintf(attr_value, "%d", 0);
|
||||
+ else
|
||||
+ sprintf(attr_value, "%d", fast_io_fail_tmo);
|
||||
+ num = sysfs_attr_set_value(attr_path, "fast_io_fail_tmo",
|
||||
+ attr_value, strlen(attr_value));
|
||||
+ if (num > 0)
|
||||
+ condlog(4, "%s: set fast_io_fail_tmo to %d", pp->dev,
|
||||
+ fast_io_fail_tmo);
|
||||
+ else
|
||||
+ condlog(4, "%s: failed to set fast_io_fail_tmo (%d)",
|
||||
+ pp->dev, errno);
|
||||
+
|
||||
+ return num == strlen(attr_value) ? 0 : 1;
|
||||
+}
|
||||
+
|
||||
static int
|
||||
opennode (char * dev, int mode)
|
||||
{
|
||||
diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h
|
||||
index 05b1cfe..3749674 100644
|
||||
--- a/libmultipath/discovery.h
|
||||
+++ b/libmultipath/discovery.h
|
||||
@@ -32,6 +32,7 @@ int devt2devname (char *, char *);
|
||||
int pathinfo (struct path *, vector hwtable, int mask);
|
||||
struct path * store_pathinfo (vector pathvec, vector hwtable,
|
||||
char * devname, int flag);
|
||||
+int sysfs_set_fc_values (struct path *pp, int dev_loss_tmo, int fast_io_fail_tmo);
|
||||
|
||||
/*
|
||||
* discovery bitmask
|
||||
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
|
||||
index a1d9632..1632c9d 100644
|
||||
--- a/libmultipath/structs_vec.c
|
||||
+++ b/libmultipath/structs_vec.c
|
||||
@@ -479,6 +479,12 @@ verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec)
|
||||
free_path(pp);
|
||||
}
|
||||
} else {
|
||||
+ if (pp->hwe)
|
||||
+ sysfs_set_fc_values(pp, pp->hwe->dev_loss_tmo,
|
||||
+ pp->hwe->fast_io_fail_tmo);
|
||||
+ else
|
||||
+ sysfs_set_fc_values(pp, conf->dev_loss_tmo,
|
||||
+ conf->fast_io_fail_tmo);
|
||||
condlog(4, "%s: verified path %s dev_t %s",
|
||||
mpp->alias, pp->dev, pp->dev_t);
|
||||
}
|
||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||
index 8ac1f1c..926ff69 100644
|
||||
--- a/multipath/multipath.conf.5
|
||||
+++ b/multipath/multipath.conf.5
|
||||
@@ -263,6 +263,14 @@ Default is
|
||||
.B bindings_file
|
||||
The full pathname of the binding file to be used when the user_friendly_names option is set. Defaults to
|
||||
.I /var/lib/multipath/bindings
|
||||
+.TP
|
||||
+.B dev_loss_tmo
|
||||
+The default dev_loss_tmo setting for an FC remote port in seconds. If an rport has vanished from the fabric all devices on that port will be removed from sysfs after this timeout.
|
||||
+.TP
|
||||
+.B fast_io_fail_tmo
|
||||
+The default fast_io_fail_tmo setting for an FC remote port in seconds. If an rport has vanished from the fabric all I/O to the devices on that port will be terminated after this timeout. Should be smaller than
|
||||
+.B dev_loss_tmo
|
||||
+setting.
|
||||
.
|
||||
.SH "blacklist section"
|
||||
The
|
||||
@@ -413,6 +421,10 @@ section:
|
||||
.B no_path_retry
|
||||
.TP
|
||||
.B rr_min_io
|
||||
+.TP
|
||||
+.B dev_loss_tmo
|
||||
+.TP
|
||||
+.B fast_io_fail_tmo
|
||||
.RE
|
||||
.PD
|
||||
.LP
|
||||
--
|
||||
1.5.3.2
|
||||
|
143
multipath-tools-implement-sysfs-attr-set-value
Normal file
143
multipath-tools-implement-sysfs-attr-set-value
Normal file
@ -0,0 +1,143 @@
|
||||
From e3354354518377b34fa3b501c11a62b61a54b0d4 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 13 Jan 2009 15:34:55 +0100
|
||||
Subject: [PATCH] Implement sysfs_attr_set_value()
|
||||
|
||||
Complement to sysfs_attr_get_value(). We might want to modify some
|
||||
sysfs values from multipathing.
|
||||
|
||||
References: bnc#464155
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/sysfs.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
libmultipath/sysfs.h | 2 +
|
||||
2 files changed, 102 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c
|
||||
index e00a101..4a472ae 100644
|
||||
--- a/libmultipath/sysfs.c
|
||||
+++ b/libmultipath/sysfs.c
|
||||
@@ -461,6 +461,106 @@ out:
|
||||
return attr && attr->value && strlen(attr->value) ? attr->value : NULL;
|
||||
}
|
||||
|
||||
+int sysfs_attr_set_value(const char *devpath, const char *attr_name,
|
||||
+ char *value, int value_len)
|
||||
+{
|
||||
+ char path_full[PATH_SIZE];
|
||||
+ const char *path;
|
||||
+ struct sysfs_attr *attr_loop;
|
||||
+ struct sysfs_attr *attr = NULL;
|
||||
+ struct stat statbuf;
|
||||
+ int fd;
|
||||
+ ssize_t size = 0;
|
||||
+ size_t sysfs_len;
|
||||
+
|
||||
+ dbg("open '%s'/'%s'", devpath, attr_name);
|
||||
+ sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
|
||||
+ if(sysfs_len >= sizeof(path_full))
|
||||
+ sysfs_len = sizeof(path_full) - 1;
|
||||
+ path = &path_full[sysfs_len];
|
||||
+ strlcat(path_full, devpath, sizeof(path_full));
|
||||
+ strlcat(path_full, "/", sizeof(path_full));
|
||||
+ strlcat(path_full, attr_name, sizeof(path_full));
|
||||
+
|
||||
+ /* look for attribute in cache */
|
||||
+ list_for_each_entry(attr_loop, &attr_list, node) {
|
||||
+ if (strcmp(attr_loop->path, path) == 0) {
|
||||
+ dbg("found in cache '%s'", attr_loop->path);
|
||||
+ attr = attr_loop;
|
||||
+ }
|
||||
+ }
|
||||
+ if (!attr) {
|
||||
+ /* store attribute in cache */
|
||||
+ dbg("new uncached attribute '%s'", path_full);
|
||||
+ attr = malloc(sizeof(struct sysfs_attr));
|
||||
+ if (attr == NULL)
|
||||
+ return -1;
|
||||
+ memset(attr, 0x00, sizeof(struct sysfs_attr));
|
||||
+ strlcpy(attr->path, path, sizeof(attr->path));
|
||||
+ dbg("add to cache '%s'", path_full);
|
||||
+ list_add(&attr->node, &attr_list);
|
||||
+ } else {
|
||||
+ /* clear old value */
|
||||
+ if(attr->value)
|
||||
+ memset(attr->value, 0x00, sizeof(attr->value));
|
||||
+ }
|
||||
+
|
||||
+ if (lstat(path_full, &statbuf) != 0) {
|
||||
+ dbg("stat '%s' failed: %s", path_full, strerror(errno));
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (S_ISLNK(statbuf.st_mode)) {
|
||||
+ /* links return the last element of the target path */
|
||||
+ char link_target[PATH_SIZE];
|
||||
+ int len;
|
||||
+ const char *pos;
|
||||
+
|
||||
+ len = readlink(path_full, link_target, sizeof(link_target));
|
||||
+ if (len > 0) {
|
||||
+ link_target[len] = '\0';
|
||||
+ pos = strrchr(link_target, '/');
|
||||
+ if (pos != NULL) {
|
||||
+ dbg("cache '%s' with link value '%s'",
|
||||
+ path_full, value);
|
||||
+ strlcpy(attr->value_local, &pos[1],
|
||||
+ sizeof(attr->value_local));
|
||||
+ attr->value = attr->value_local;
|
||||
+ }
|
||||
+ }
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* skip directories */
|
||||
+ if (S_ISDIR(statbuf.st_mode))
|
||||
+ goto out;
|
||||
+
|
||||
+ /* skip non-readable files */
|
||||
+ if ((statbuf.st_mode & S_IRUSR) == 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ /* write attribute value */
|
||||
+ fd = open(path_full, O_WRONLY);
|
||||
+ if (fd < 0) {
|
||||
+ dbg("attribute '%s' can not be opened: %s",
|
||||
+ path_full, strerror(errno));
|
||||
+ goto out;
|
||||
+ }
|
||||
+ size = write(fd, value, value_len);
|
||||
+ close(fd);
|
||||
+ if (size < 0)
|
||||
+ goto out;
|
||||
+
|
||||
+ /* successfully wrote new value, store it */
|
||||
+ remove_trailing_chars(value, '\n');
|
||||
+ dbg("cache '%s' with attribute value '%s'", path_full, value);
|
||||
+ strlcpy(attr->value_local, value, sizeof(attr->value_local));
|
||||
+ attr->value = attr->value_local;
|
||||
+
|
||||
+out:
|
||||
+ return size;
|
||||
+}
|
||||
+
|
||||
int sysfs_lookup_devpath_by_subsys_id(char *devpath_full, size_t len,
|
||||
const char *subsystem, const char *id)
|
||||
{
|
||||
diff --git a/libmultipath/sysfs.h b/libmultipath/sysfs.h
|
||||
index 620962c..ac76acf 100644
|
||||
--- a/libmultipath/sysfs.h
|
||||
+++ b/libmultipath/sysfs.h
|
||||
@@ -20,6 +20,8 @@ struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev);
|
||||
struct sysfs_device *sysfs_device_get_parent_with_subsystem(struct sysfs_device *dev, const char *subsystem);
|
||||
void sysfs_device_put(struct sysfs_device *dev);
|
||||
char *sysfs_attr_get_value(const char *devpath, const char *attr_name);
|
||||
+int sysfs_attr_set_value(const char *devpath, const char *attr_name,
|
||||
+ char *value, int value_len);
|
||||
int sysfs_resolve_link(char *path, size_t size);
|
||||
int sysfs_get_size (struct sysfs_device * dev, unsigned long long * size);
|
||||
|
||||
--
|
||||
1.5.3.2
|
||||
|
85
multipath-tools-more-debugging-output
Normal file
85
multipath-tools-more-debugging-output
Normal file
@ -0,0 +1,85 @@
|
||||
commit d3f2f760250ff40f31ea5ddab7d45c86ba32bab6
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed Jan 7 11:05:45 2009 +0100
|
||||
|
||||
Add more debugging output
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index c4a53ab..868dcc7 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -689,11 +689,15 @@ get_state (struct path * pp)
|
||||
|
||||
if (!checker_selected(c)) {
|
||||
select_checker(pp);
|
||||
- if (!checker_selected(c))
|
||||
+ if (!checker_selected(c)) {
|
||||
+ condlog(3, "%s: No checker selected", pp->dev);
|
||||
return 1;
|
||||
+ }
|
||||
checker_set_fd(c, pp->fd);
|
||||
- if (checker_init(c, pp->mpp?&pp->mpp->mpcontext:NULL))
|
||||
+ if (checker_init(c, pp->mpp?&pp->mpp->mpcontext:NULL)) {
|
||||
+ condlog(3, "%s: checker init failed", pp->dev);
|
||||
return 1;
|
||||
+ }
|
||||
}
|
||||
pp->state = checker_check(c);
|
||||
condlog(3, "%s: state = %i", pp->dev, pp->state);
|
||||
@@ -711,8 +715,10 @@ get_prio (struct path * pp)
|
||||
|
||||
if (!pp->prio) {
|
||||
select_prio(pp);
|
||||
- if (!pp->prio)
|
||||
+ if (!pp->prio) {
|
||||
+ condlog(3, "%s: no prio selected", pp->dev);
|
||||
return 1;
|
||||
+ }
|
||||
}
|
||||
pp->priority = prio_getprio(pp->prio, pp);
|
||||
if (pp->priority < 0) {
|
||||
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
|
||||
index 3770566..a1d9632 100644
|
||||
--- a/libmultipath/structs_vec.c
|
||||
+++ b/libmultipath/structs_vec.c
|
||||
@@ -282,6 +282,7 @@ update_multipath_status (struct multipath *mpp)
|
||||
extern int
|
||||
update_multipath_strings (struct multipath *mpp, vector pathvec)
|
||||
{
|
||||
+ condlog(4, "%s: %s", mpp->alias, __FUNCTION__);
|
||||
free_multipath_attributes(mpp);
|
||||
free_pgvec(mpp->pg, KEEP_PATHS);
|
||||
mpp->pg = NULL;
|
||||
@@ -477,6 +478,9 @@ verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec)
|
||||
vector_del_slot(vecs->pathvec, j);
|
||||
free_path(pp);
|
||||
}
|
||||
+ } else {
|
||||
+ condlog(4, "%s: verified path %s dev_t %s",
|
||||
+ mpp->alias, pp->dev, pp->dev_t);
|
||||
}
|
||||
}
|
||||
return count;
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index c60d075..b39ba90 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -396,6 +396,8 @@ ev_add_path (char * devname, struct vectors * vecs)
|
||||
mpp = pp->mpp = find_mp_by_wwid(vecs->mpvec, pp->wwid);
|
||||
rescan:
|
||||
if (mpp) {
|
||||
+ condlog(4,"%s: adopting all paths for path %s",
|
||||
+ mpp->alias, pp->dev);
|
||||
if (adopt_paths(vecs->pathvec, mpp))
|
||||
return 1; /* leave path added to pathvec */
|
||||
|
||||
@@ -403,6 +405,7 @@ rescan:
|
||||
mpp->action = ACT_RELOAD;
|
||||
}
|
||||
else {
|
||||
+ condlog(4,"%s: creating new map", pp->dev);
|
||||
if ((mpp = add_map_with_path(vecs, pp, 1)))
|
||||
mpp->action = ACT_CREATE;
|
||||
else
|
43
multipath-tools-print-dm-tables
Normal file
43
multipath-tools-print-dm-tables
Normal file
@ -0,0 +1,43 @@
|
||||
commit 96f43ccaf6bf5288bfb94344e5c9a60ff5354083
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Fri Dec 19 09:39:52 2008 +0100
|
||||
|
||||
Print out maps in dmparser.c
|
||||
|
||||
For debugging it's quite helpful to have the actual maps as
|
||||
being sent to device-mapper printed out.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/dmparser.c b/libmultipath/dmparser.c
|
||||
index 0cef666..33b5cde 100644
|
||||
--- a/libmultipath/dmparser.c
|
||||
+++ b/libmultipath/dmparser.c
|
||||
@@ -107,6 +107,9 @@ assemble_map (struct multipath * mp, char * params, int len)
|
||||
return 1;
|
||||
}
|
||||
snprintf(p, 1, "\n");
|
||||
+
|
||||
+ condlog(3, "%s: assembled map [%s]\n", mp->alias, params);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -128,6 +131,8 @@ disassemble_map (vector pathvec, char * params, struct multipath * mpp)
|
||||
|
||||
p = params;
|
||||
|
||||
+ condlog(3, "%s: disassemble map [%s]\n", mpp->alias, params);
|
||||
+
|
||||
/*
|
||||
* features
|
||||
*/
|
||||
@@ -354,6 +359,8 @@ disassemble_status (char * params, struct multipath * mpp)
|
||||
|
||||
p = params;
|
||||
|
||||
+ condlog(3, "%s: disassemble status [%s]\n", mpp->alias, params);
|
||||
+
|
||||
/*
|
||||
* features
|
||||
*/
|
26
multipath-tools-quote-variable-in-mkinitrd-setup
Normal file
26
multipath-tools-quote-variable-in-mkinitrd-setup
Normal file
@ -0,0 +1,26 @@
|
||||
commit 94ed8e8244e89700d702c54d8a791e190b3868df
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Mon Nov 24 10:46:36 2008 +0100
|
||||
|
||||
Properly quote variables in mkinitrd scripts
|
||||
|
||||
We should quote variables properly, otherwise we risk some script
|
||||
syntax errors.
|
||||
|
||||
References: 447966
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/multipath/setup-multipath.sh b/multipath/setup-multipath.sh
|
||||
index 1670071..bb9b244 100644
|
||||
--- a/multipath/setup-multipath.sh
|
||||
+++ b/multipath/setup-multipath.sh
|
||||
@@ -12,7 +12,7 @@ fi
|
||||
if [ -x /sbin/multipath -a -x /sbin/dmsetup ] ; then
|
||||
for bd in $blockdev ; do
|
||||
update_blockdev $bd
|
||||
- if [ $blockdriver = device-mapper ]; then
|
||||
+ if [ "$blockdriver" = device-mapper ]; then
|
||||
dm_uuid=$(dmsetup info -c --noheadings -o uuid -j $blockmajor -m $blockminor)
|
||||
dm_creator=${dm_uuid%-*}
|
||||
if [ "$dm_creator" = "mpath" ]; then
|
27
multipath-tools-remove-kdev_t
Normal file
27
multipath-tools-remove-kdev_t
Normal file
@ -0,0 +1,27 @@
|
||||
From e70d95062c5aaa9218fc0b610ced88280df50650 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 18 Dec 2008 10:03:15 +0100
|
||||
Subject: [PATCH] Remove kdev_t.h include
|
||||
|
||||
Pointless and giving the users the wrong impression.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/devmapper.c | 1 -
|
||||
1 files changed, 0 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
|
||||
index a7ab41f..713db6a 100644
|
||||
--- a/libmultipath/devmapper.c
|
||||
+++ b/libmultipath/devmapper.c
|
||||
@@ -10,7 +10,6 @@
|
||||
#include <string.h>
|
||||
#include <libdevmapper.h>
|
||||
#include <ctype.h>
|
||||
-#include <linux/kdev_t.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
--
|
||||
1.6.0.2
|
||||
|
53
multipath-tools-set-max_fds-parameter-for-multipath
Normal file
53
multipath-tools-set-max_fds-parameter-for-multipath
Normal file
@ -0,0 +1,53 @@
|
||||
From cce0922defb5c89c63ed42d2ea4a398d6a8c5a29 Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Tue, 9 Dec 2008 12:26:49 +0100
|
||||
Subject: [PATCH] Set 'max_fds' parameter for multipath
|
||||
|
||||
max_fds should be enabled for multipath, too.
|
||||
|
||||
References: 457443
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
multipath/main.c | 18 ++++++++++++++++++
|
||||
1 files changed, 18 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/multipath/main.c b/multipath/main.c
|
||||
index ffa6eb5..49b5619 100644
|
||||
--- a/multipath/main.c
|
||||
+++ b/multipath/main.c
|
||||
@@ -48,6 +48,9 @@
|
||||
#include <configure.h>
|
||||
#include <pgpolicies.h>
|
||||
#include <version.h>
|
||||
+#include <errno.h>
|
||||
+#include <sys/time.h>
|
||||
+#include <sys/resource.h>
|
||||
|
||||
int logsink;
|
||||
|
||||
@@ -477,6 +480,21 @@ main (int argc, char *argv[])
|
||||
conf->dev_type = DEV_DEVMAP;
|
||||
|
||||
}
|
||||
+ if (conf->max_fds) {
|
||||
+ struct rlimit fd_limit;
|
||||
+ if (conf->max_fds > 0) {
|
||||
+ fd_limit.rlim_cur = conf->max_fds;
|
||||
+ fd_limit.rlim_max = conf->max_fds;
|
||||
+ }
|
||||
+ else {
|
||||
+ fd_limit.rlim_cur = RLIM_INFINITY;
|
||||
+ fd_limit.rlim_max = RLIM_INFINITY;
|
||||
+ }
|
||||
+ if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0)
|
||||
+ condlog(0, "can't set open fds limit to %d : %s\n",
|
||||
+ conf->max_fds, strerror(errno));
|
||||
+ }
|
||||
+
|
||||
dm_init();
|
||||
|
||||
if (conf->remove == FLUSH_ONE) {
|
||||
--
|
||||
1.6.0.2
|
||||
|
38
multipath-tools-shuffle-memarea-init
Normal file
38
multipath-tools-shuffle-memarea-init
Normal file
@ -0,0 +1,38 @@
|
||||
commit a8c6e0c6da02d83b86280dbd1162c44f8cefb53f
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed Jan 7 10:59:46 2009 +0100
|
||||
|
||||
Shuffle to the call to memset in logarea_init()
|
||||
|
||||
We should call memset only after we know the area has been
|
||||
allocated.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/log.c b/libmultipath/log.c
|
||||
index 0dd1c22..0cf5047 100644
|
||||
--- a/libmultipath/log.c
|
||||
+++ b/libmultipath/log.c
|
||||
@@ -47,12 +47,11 @@ static int logarea_init (int size)
|
||||
size = DEFAULT_AREA_SIZE;
|
||||
|
||||
la->start = MALLOC(size);
|
||||
- memset(la->start, 0, size);
|
||||
-
|
||||
if (!la->start) {
|
||||
FREE(la);
|
||||
return 1;
|
||||
}
|
||||
+ memset(la->start, 0, size);
|
||||
|
||||
la->empty = 1;
|
||||
la->end = la->start + size;
|
||||
@@ -143,7 +142,7 @@ int log_enqueue (int prio, const char * fmt, va_list ap)
|
||||
la->empty = 0;
|
||||
msg = (struct logmsg *)la->tail;
|
||||
msg->prio = prio;
|
||||
- memcpy((void *)&msg->str, buff, strlen(buff));
|
||||
+ strcpy((void *)&msg->str, buff);
|
||||
lastmsg->next = la->tail;
|
||||
msg->next = la->head;
|
||||
|
@ -3178,7 +3178,7 @@
|
||||
switch(arg) {
|
||||
case 1: printf("optarg : %s\n",optarg);
|
||||
break;
|
||||
@@ -387,16 +438,19 @@
|
||||
@@ -387,23 +438,26 @@
|
||||
if (conf->pgpolicy_flag == -1) {
|
||||
printf("'%s' is not a valid policy\n", optarg);
|
||||
usage(argv[0]);
|
||||
@ -3200,6 +3200,14 @@
|
||||
case '?':
|
||||
fprintf(stderr, "Unknown switch: %s\n", optarg);
|
||||
usage(argv[0]);
|
||||
default:
|
||||
usage(argv[0]);
|
||||
}
|
||||
- }
|
||||
+ }
|
||||
if (optind < argc) {
|
||||
conf->dev = MALLOC(FILE_NAME_SIZE);
|
||||
|
||||
--- multipath-tools-0.4.8/multipath/multipath.8
|
||||
+++ multipath-tools-0.4.8/multipath/multipath.8
|
||||
@@ -6,7 +6,7 @@
|
||||
|
23
multipath-tools-start-xdr_setsite
Normal file
23
multipath-tools-start-xdr_setsite
Normal file
@ -0,0 +1,23 @@
|
||||
commit 5b86869d6e83660fa9f004313497b67d67c78bea
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Mon Dec 1 10:01:40 2008 +0100
|
||||
|
||||
Add Should-Start entry for IBM xDR
|
||||
|
||||
IBM's xDR solution requires a should-start entry.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/multipath/multipath.init.suse b/multipath/multipath.init.suse
|
||||
index 7dd7031..4f2d8b0 100755
|
||||
--- a/multipath/multipath.init.suse
|
||||
+++ b/multipath/multipath.init.suse
|
||||
@@ -9,6 +9,8 @@
|
||||
# Required-Start: boot.device-mapper boot.udev
|
||||
# Required-Stop: boot.device-mapper boot.udev
|
||||
# Default-Start: B
|
||||
+# Should-Start: boot.xdrsetsite
|
||||
+# Should-Stop: boot.xdrsetsite
|
||||
# Default-Stop:
|
||||
# Short-Description: Create multipath device targets
|
||||
# Description: Setup initial multipath device-mapper targets
|
165
multipath-tools-update-dev_loss_tmo-handling
Normal file
165
multipath-tools-update-dev_loss_tmo-handling
Normal file
@ -0,0 +1,165 @@
|
||||
commit 56f63c78a2f6446d283cfeb6884b6f730a712488
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed Jan 21 14:44:48 2009 +0100
|
||||
|
||||
Update dev_loss_tmo handling
|
||||
|
||||
The original implementation didn't update the hwe-specific settings
|
||||
and failed to detect the correct rport. So fixing it.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index d8d1e30..c37247a 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -212,12 +212,10 @@ sysfs_get_fc_nodename (struct sysfs_device * dev, char * node,
|
||||
int
|
||||
sysfs_set_fc_values (struct path *pp, int dev_loss_tmo, int fast_io_fail_tmo)
|
||||
{
|
||||
+ char *rport;
|
||||
char attr_path[SYSFS_PATH_SIZE];
|
||||
- char host_path[SYSFS_PATH_SIZE];
|
||||
char attr_value[NAME_SIZE];
|
||||
- DIR *host_dir, *rport_dir;
|
||||
- struct dirent *host_ent, *rport_ent;
|
||||
- int host, channel, lun, port, num;
|
||||
+ int host, num;
|
||||
int rport_channel = -1;
|
||||
int rport_id = -1;
|
||||
|
||||
@@ -226,74 +224,48 @@ sysfs_set_fc_values (struct path *pp, int dev_loss_tmo, int fast_io_fail_tmo)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- if (safe_sprintf(host_path, "/sys/class/fc_host/host%i/device",
|
||||
- pp->sg_id.host_no)) {
|
||||
- condlog(0, "host_path too small");
|
||||
- return 1;
|
||||
- }
|
||||
- if (!(host_dir = opendir(host_path))) {
|
||||
- condlog(3, "host %d not a FC HBA", pp->sg_id.host_no);
|
||||
+ if (!pp->sysdev) {
|
||||
+ condlog(3, "%s: no sysfs device set", pp->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
- while (rport_channel < 0 && rport_id < 0 &&
|
||||
- (host_ent = readdir(host_dir))) {
|
||||
- if (sscanf(host_ent->d_name, "rport-%d:%d-%d",
|
||||
- &host, &port, &num) != 3)
|
||||
- continue;
|
||||
-
|
||||
- if (host != pp->sg_id.host_no)
|
||||
- continue;
|
||||
-
|
||||
- if (safe_sprintf(attr_path, "%s/%s",
|
||||
- host_path, host_ent->d_name)) {
|
||||
- condlog(0, "target_path too small");
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- if (!(rport_dir = opendir(attr_path))) {
|
||||
- condlog(1, "cannot open rport path '%s'", attr_path);
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
- while ((rport_ent = readdir(rport_dir))) {
|
||||
- if (sscanf(rport_ent->d_name, "target%d:%d:%d",
|
||||
- &host, &channel, &lun) != 3)
|
||||
- continue;
|
||||
-
|
||||
- if (host != pp->sg_id.host_no &&
|
||||
- channel != pp->sg_id.channel &&
|
||||
- lun != pp->sg_id.scsi_id)
|
||||
- continue;
|
||||
+ condlog(4, "%s: checking rport for %s", pp->dev,
|
||||
+ pp->sysdev ? pp->sysdev->devpath : NULL);
|
||||
|
||||
- rport_channel = port;
|
||||
- rport_id = num;
|
||||
- break;
|
||||
- }
|
||||
+ rport = strstr(pp->sysdev->devpath, "rport");
|
||||
+ if (!rport || sscanf(rport, "rport-%d:%d-%d/%*s",
|
||||
+ &host, &rport_channel, &rport_id) != 3) {
|
||||
+ condlog(3, "%s: Invalid devpath %s",
|
||||
+ pp->dev, pp->sysdev->devpath);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
if (rport_channel < 0 && rport_id < 0) {
|
||||
- condlog(1, "No rport found");
|
||||
+ condlog(3, "%s: No rport found", pp->dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ condlog(4, "%s: using rport-%d:%d-%d for target%d:%d:%d", pp->dev,
|
||||
+ host, rport_channel, rport_id,
|
||||
+ pp->sg_id.host_no, pp->sg_id.channel, pp->sg_id.scsi_id);
|
||||
+
|
||||
if (safe_sprintf(attr_path,
|
||||
"/class/fc_remote_ports/rport-%d:%d-%d",
|
||||
- pp->sg_id.host_no, rport_channel, rport_id)) {
|
||||
- condlog(0, "attr_path too small");
|
||||
+ host, rport_channel, rport_id)) {
|
||||
+ condlog(1, "attr_path too small");
|
||||
return 0;
|
||||
}
|
||||
|
||||
+ condlog(4, "%s: set dev_loss_tmo to %d, fast_io_fail to %d",
|
||||
+ pp->dev, dev_loss_tmo, fast_io_fail_tmo);
|
||||
+
|
||||
if (dev_loss_tmo < 0)
|
||||
sprintf(attr_value, "%d", 0);
|
||||
else
|
||||
sprintf(attr_value, "%d", dev_loss_tmo);
|
||||
num = sysfs_attr_set_value(attr_path, "dev_loss_tmo",
|
||||
attr_value, strlen(attr_value));
|
||||
- if (num > 0)
|
||||
- condlog(4, "%s: set dev_loss_tmo to %d", pp->dev,
|
||||
- dev_loss_tmo);
|
||||
- else
|
||||
+ if (num <= 0)
|
||||
condlog(4, "%s: failed to set dev_loss_tmo (%d)",
|
||||
pp->dev, errno);
|
||||
|
||||
@@ -303,10 +275,7 @@ sysfs_set_fc_values (struct path *pp, int dev_loss_tmo, int fast_io_fail_tmo)
|
||||
sprintf(attr_value, "%d", fast_io_fail_tmo);
|
||||
num = sysfs_attr_set_value(attr_path, "fast_io_fail_tmo",
|
||||
attr_value, strlen(attr_value));
|
||||
- if (num > 0)
|
||||
- condlog(4, "%s: set fast_io_fail_tmo to %d", pp->dev,
|
||||
- fast_io_fail_tmo);
|
||||
- else
|
||||
+ if (num <= 0)
|
||||
condlog(4, "%s: failed to set fast_io_fail_tmo (%d)",
|
||||
pp->dev, errno);
|
||||
|
||||
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
|
||||
index 1632c9d..6cc7a93 100644
|
||||
--- a/libmultipath/structs_vec.c
|
||||
+++ b/libmultipath/structs_vec.c
|
||||
@@ -479,12 +479,16 @@ verify_paths(struct multipath * mpp, struct vectors * vecs, vector rpvec)
|
||||
free_path(pp);
|
||||
}
|
||||
} else {
|
||||
- if (pp->hwe)
|
||||
- sysfs_set_fc_values(pp, pp->hwe->dev_loss_tmo,
|
||||
- pp->hwe->fast_io_fail_tmo);
|
||||
- else
|
||||
- sysfs_set_fc_values(pp, conf->dev_loss_tmo,
|
||||
- conf->fast_io_fail_tmo);
|
||||
+ int dev_loss_tmo = conf->dev_loss_tmo;
|
||||
+ int fast_io_fail_tmo = conf->fast_io_fail_tmo;
|
||||
+
|
||||
+ if (pp->hwe && pp->hwe->dev_loss_tmo > 0)
|
||||
+ dev_loss_tmo = pp->hwe->dev_loss_tmo;
|
||||
+ if (pp->hwe && pp->hwe->fast_io_fail_tmo > 0)
|
||||
+ fast_io_fail_tmo = pp->hwe->fast_io_fail_tmo;
|
||||
+
|
||||
+ sysfs_set_fc_values(pp, dev_loss_tmo,
|
||||
+ fast_io_fail_tmo);
|
||||
condlog(4, "%s: verified path %s dev_t %s",
|
||||
mpp->alias, pp->dev, pp->dev_t);
|
||||
}
|
@ -80,38 +80,38 @@ index fda131c..bf8c611 100644
|
||||
.prio_name = DEFAULT_PRIO,
|
||||
},
|
||||
{
|
||||
+ /* HP MSA2000 product family with new firmware */
|
||||
+ .vendor = "HP",
|
||||
+ .product = "MSA2012sa|MSA23(12|24)(fc|i|sa)",
|
||||
+ .getuid = DEFAULT_GETUID,
|
||||
+ .features = DEFAULT_FEATURES,
|
||||
+ .hwhandler = DEFAULT_HWHANDLER,
|
||||
+ .selector = DEFAULT_SELECTOR,
|
||||
+ .pgpolicy = GROUP_BY_PRIO,
|
||||
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||
+ .rr_weight = RR_WEIGHT_NONE,
|
||||
+ .no_path_retry = 18,
|
||||
+ .minio = 100,
|
||||
+ .checker_name = TUR,
|
||||
+ .prio_name = PRIO_ALUA,
|
||||
+ },
|
||||
+ /* HP MSA2000 product family with new firmware */
|
||||
+ .vendor = "HP",
|
||||
+ .product = "MSA2012sa|MSA23(12|24)(fc|i|sa)",
|
||||
+ .getuid = DEFAULT_GETUID,
|
||||
+ .features = DEFAULT_FEATURES,
|
||||
+ .hwhandler = DEFAULT_HWHANDLER,
|
||||
+ .selector = DEFAULT_SELECTOR,
|
||||
+ .pgpolicy = GROUP_BY_PRIO,
|
||||
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||
+ .rr_weight = RR_WEIGHT_NONE,
|
||||
+ .no_path_retry = 18,
|
||||
+ .minio = 100,
|
||||
+ .checker_name = TUR,
|
||||
+ .prio_name = PRIO_ALUA,
|
||||
+ },
|
||||
+
|
||||
+ {
|
||||
+ /* HP SVSP */
|
||||
+ .vendor = "HP",
|
||||
+ .product = "HSVX700",
|
||||
+ .getuid = DEFAULT_GETUID,
|
||||
+ .features = DEFAULT_FEATURES,
|
||||
+ .hwhandler = "1 alua",
|
||||
+ .selector = DEFAULT_SELECTOR,
|
||||
+ .pgpolicy = GROUP_BY_PRIO,
|
||||
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||
+ .rr_weight = RR_WEIGHT_NONE,
|
||||
+ .no_path_retry = 12,
|
||||
+ .minio = 100,
|
||||
+ .checker_name = TUR,
|
||||
+ .prio_name = PRIO_ALUA,
|
||||
+ },
|
||||
+ {
|
||||
+ /* HP SVSP */
|
||||
+ .vendor = "HP",
|
||||
+ .product = "HSVX700",
|
||||
+ .getuid = DEFAULT_GETUID,
|
||||
+ .features = DEFAULT_FEATURES,
|
||||
+ .hwhandler = "1 alua",
|
||||
+ .selector = DEFAULT_SELECTOR,
|
||||
+ .pgpolicy = GROUP_BY_PRIO,
|
||||
+ .pgfailback = -FAILBACK_IMMEDIATE,
|
||||
+ .rr_weight = RR_WEIGHT_NONE,
|
||||
+ .no_path_retry = 12,
|
||||
+ .minio = 100,
|
||||
+ .checker_name = TUR,
|
||||
+ .prio_name = PRIO_ALUA,
|
||||
+ },
|
||||
+
|
||||
+ {
|
||||
/* HP Smart Array */
|
||||
|
123
multipath-tools-update-sdev_state-handling
Normal file
123
multipath-tools-update-sdev_state-handling
Normal file
@ -0,0 +1,123 @@
|
||||
commit bff69e33ca279de49c5cebc33107c99cbf2c4bea
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Wed Jan 21 14:59:30 2009 +0100
|
||||
|
||||
Fix up sdev_state handling
|
||||
|
||||
Before trying to access any path checker of priority callouts we
|
||||
really should check the sdev state; only when in 'running' the
|
||||
callout is likely to succeed. So modify the handling to properly
|
||||
check the sdev_state and return a proper error for failure state.
|
||||
|
||||
References: 458393
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index c37247a..c09e7ed 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -661,6 +661,44 @@ common_sysfs_pathinfo (struct path * pp, struct sysfs_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int sysfs_get_sdev_state(struct path *pp)
|
||||
+{
|
||||
+ struct sysfs_device *parent;
|
||||
+ char dev_state[32];
|
||||
+
|
||||
+ /* check device state */
|
||||
+ if (!pp->sysdev) {
|
||||
+ condlog(3, "%s: no sysfs device", pp->dev);
|
||||
+ return PATH_WILD;
|
||||
+ }
|
||||
+ parent = sysfs_device_get_parent(pp->sysdev);
|
||||
+ if (!parent) {
|
||||
+ condlog(3, "%s: no parent for '%s'",
|
||||
+ pp->dev, pp->sysdev->devpath);
|
||||
+ return PATH_WILD;
|
||||
+ }
|
||||
+ if (!strncmp(parent->kernel, "block", 5)) {
|
||||
+ parent = sysfs_device_get_parent(parent);
|
||||
+ }
|
||||
+ if (!parent) {
|
||||
+ condlog(3, "%s: no block device for '%s'",
|
||||
+ pp->dev, parent->devpath);
|
||||
+ return PATH_WILD;
|
||||
+ }
|
||||
+ if (!sysfs_get_state(parent, dev_state, 32)) {
|
||||
+ if (!strncmp(dev_state, "blocked", 7)) {
|
||||
+ condlog(3, "%s: device blocked", pp->dev);
|
||||
+ return PATH_UNCHECKED;
|
||||
+ } else if (!strncmp(dev_state, "running", 7)) {
|
||||
+ return PATH_UP;
|
||||
+ }
|
||||
+ condlog(3, "%s: device in state %s",
|
||||
+ pp->dev, dev_state);
|
||||
+ return PATH_DOWN;
|
||||
+ }
|
||||
+ return PATH_WILD;
|
||||
+}
|
||||
+
|
||||
struct sysfs_device *sysfs_device_from_path(struct path *pp)
|
||||
{
|
||||
char sysdev[FILE_NAME_SIZE];
|
||||
@@ -762,20 +800,12 @@ get_state (struct path * pp)
|
||||
condlog(3, "%s: get_state", pp->dev);
|
||||
|
||||
if (pp->bus == SYSFS_BUS_SCSI && pp->sysdev) {
|
||||
- struct sysfs_device *parent;
|
||||
- char dev_state[32];
|
||||
-
|
||||
- /* check device state */
|
||||
- parent = sysfs_device_get_parent(pp->sysdev);
|
||||
- if (parent && !strncmp(parent->kernel, "block", 5))
|
||||
- parent = sysfs_device_get_parent(parent);
|
||||
- if (parent && !sysfs_get_state(parent, dev_state, 32)) {
|
||||
- if (!strncmp(dev_state, "blocked", 7)) {
|
||||
- condlog(3, "%s: device blocked", pp->dev);
|
||||
- pp->state = PATH_DOWN;
|
||||
- pp->priority = 0;
|
||||
- return 0;
|
||||
- }
|
||||
+ /* Check the sdev state before accessing it */
|
||||
+ pp->state = sysfs_get_sdev_state(pp);
|
||||
+ if (pp->state == PATH_UNCHECKED || pp->state == PATH_DOWN) {
|
||||
+ /* Further checking pointless */
|
||||
+ pp->priority = 0;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
if (!checker_selected(c)) {
|
||||
@@ -801,23 +831,17 @@ get_state (struct path * pp)
|
||||
static int
|
||||
get_prio (struct path * pp)
|
||||
{
|
||||
+ int path_state;
|
||||
+
|
||||
if (!pp)
|
||||
return 0;
|
||||
|
||||
- if (pp->bus == SYSFS_BUS_SCSI && pp->sysdev) {
|
||||
- struct sysfs_device *parent;
|
||||
- char dev_state[32];
|
||||
-
|
||||
- /* check device state */
|
||||
- parent = sysfs_device_get_parent(pp->sysdev);
|
||||
- if (parent && !strncmp(parent->kernel, "block", 5))
|
||||
- parent = sysfs_device_get_parent(parent);
|
||||
- if (parent && !sysfs_get_state(parent, dev_state, 32)) {
|
||||
- if (!strncmp(dev_state, "blocked", 7)) {
|
||||
- condlog(3, "%s: device blocked", pp->dev);
|
||||
- pp->priority = PRIO_UNDEF;
|
||||
- return 0;
|
||||
- }
|
||||
+ if (pp->bus == SYSFS_BUS_SCSI) {
|
||||
+ /* Check the sdev state before accessing it */
|
||||
+ path_state = sysfs_get_sdev_state(pp);
|
||||
+ if (path_state == PATH_DOWN || path_state == PATH_UNCHECKED) {
|
||||
+ pp->priority = PRIO_UNDEF;
|
||||
+ return 0;
|
||||
}
|
||||
}
|
||||
|
62
multipath-tools-use-MALLOC-FREE-for-checker
Normal file
62
multipath-tools-use-MALLOC-FREE-for-checker
Normal file
@ -0,0 +1,62 @@
|
||||
From 0f7c86b8ba073570acc7fa31c9f52adc2cf4ac8f Mon Sep 17 00:00:00 2001
|
||||
From: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu, 8 Jan 2009 09:12:36 +0100
|
||||
Subject: [PATCH] Use MALLOC/FREE for checker and prio allocation
|
||||
|
||||
We should be using the proper defines for malloc/free to
|
||||
ease tracking of memory leaks.
|
||||
|
||||
Signed-off-by: Konrad Rzeszutek <konrad@virtualiron.com>
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
---
|
||||
libmultipath/checkers.c | 4 ++--
|
||||
libmultipath/prio.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
||||
index 231b408..45ef531 100644
|
||||
--- a/libmultipath/checkers.c
|
||||
+++ b/libmultipath/checkers.c
|
||||
@@ -38,7 +38,7 @@ struct checker * alloc_checker (void)
|
||||
{
|
||||
struct checker *c;
|
||||
|
||||
- c = zalloc(sizeof(struct checker));
|
||||
+ c = MALLOC(sizeof(struct checker));
|
||||
if (c)
|
||||
INIT_LIST_HEAD(&c->node);
|
||||
return c;
|
||||
@@ -54,7 +54,7 @@ void free_checker (struct checker * c)
|
||||
c->name, dlerror());
|
||||
}
|
||||
}
|
||||
- free(c);
|
||||
+ FREE(c);
|
||||
}
|
||||
|
||||
void cleanup_checkers (void)
|
||||
diff --git a/libmultipath/prio.c b/libmultipath/prio.c
|
||||
index 1b9f51b..5e01f54 100644
|
||||
--- a/libmultipath/prio.c
|
||||
+++ b/libmultipath/prio.c
|
||||
@@ -22,7 +22,7 @@ struct prio * alloc_prio (void)
|
||||
{
|
||||
struct prio *p;
|
||||
|
||||
- p = zalloc(sizeof(struct prio));
|
||||
+ p = MALLOC(sizeof(struct prio));
|
||||
if (p)
|
||||
INIT_LIST_HEAD(&p->node);
|
||||
return p;
|
||||
@@ -38,7 +38,7 @@ void free_prio (struct prio * p)
|
||||
p->name, dlerror());
|
||||
}
|
||||
}
|
||||
- free(p);
|
||||
+ FREE(p);
|
||||
}
|
||||
|
||||
void cleanup_prio(void)
|
||||
--
|
||||
1.6.0.2
|
||||
|
58
multipath-tools-use-default-for-dev_loss_tmo
Normal file
58
multipath-tools-use-default-for-dev_loss_tmo
Normal file
@ -0,0 +1,58 @@
|
||||
commit 9751659f37b9bf19ece7849e7186f67a6760c31a
|
||||
Author: Hannes Reinecke <hare@suse.de>
|
||||
Date: Thu Jan 15 12:01:33 2009 +0100
|
||||
|
||||
Use defaults for dev_loss_tmo and fast_io_fail_tmo
|
||||
|
||||
We should be using some sensible defaults. So using '10' for
|
||||
dev_loss_tmo and '5' for fast_io_fail_tmo.
|
||||
|
||||
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index ea7ad99..58485c6 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -463,8 +463,8 @@ load_config (char * file)
|
||||
conf->dev_type = DEV_NONE;
|
||||
conf->minio = 1000;
|
||||
conf->max_fds = 0;
|
||||
- conf->dev_loss_tmo = 0;
|
||||
- conf->fast_io_fail_tmo = 0;
|
||||
+ conf->dev_loss_tmo = DEFAULT_DEV_LOSS_TMO;
|
||||
+ conf->fast_io_fail_tmo = DEFAULT_FAST_IO_FAIL;
|
||||
conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
|
||||
|
||||
/*
|
||||
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
|
||||
index a943673..4a55ff9 100644
|
||||
--- a/libmultipath/defaults.h
|
||||
+++ b/libmultipath/defaults.h
|
||||
@@ -12,6 +12,8 @@
|
||||
#define DEFAULT_PGTIMEOUT -PGTIMEOUT_NONE
|
||||
#define DEFAULT_USER_FRIENDLY_NAMES 0
|
||||
#define DEFAULT_VERBOSITY 2
|
||||
+#define DEFAULT_DEV_LOSS_TMO 10
|
||||
+#define DEFAULT_FAST_IO_FAIL 5
|
||||
|
||||
#define DEFAULT_CHECKINT 5
|
||||
#define MAX_CHECKINT(a) (a << 2)
|
||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||
index 926ff69..d29a3b6 100644
|
||||
--- a/multipath/multipath.conf.5
|
||||
+++ b/multipath/multipath.conf.5
|
||||
@@ -265,12 +265,12 @@ The full pathname of the binding file to be used when the user_friendly_names op
|
||||
.I /var/lib/multipath/bindings
|
||||
.TP
|
||||
.B dev_loss_tmo
|
||||
-The default dev_loss_tmo setting for an FC remote port in seconds. If an rport has vanished from the fabric all devices on that port will be removed from sysfs after this timeout.
|
||||
+The default dev_loss_tmo setting for an FC remote port in seconds. If an rport has vanished from the fabric all devices on that port will be removed from sysfs after this timeout. Default is 10.
|
||||
.TP
|
||||
.B fast_io_fail_tmo
|
||||
The default fast_io_fail_tmo setting for an FC remote port in seconds. If an rport has vanished from the fabric all I/O to the devices on that port will be terminated after this timeout. Should be smaller than
|
||||
.B dev_loss_tmo
|
||||
-setting.
|
||||
+setting. Default is 5.
|
||||
.
|
||||
.SH "blacklist section"
|
||||
The
|
@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 23 14:15:18 CET 2009 - hare@suse.de
|
||||
|
||||
- Update dev_loss_tmo handling (bnc#458393)
|
||||
- Fix directio error messages
|
||||
- Update sdev_state handling
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 19 09:18:28 CET 2009 - hare@suse.de
|
||||
|
||||
- Add new HP machines to hardware table (bnc#442133)
|
||||
- Print device-mapper tables for debugging
|
||||
- Properly quote variables in mkinitrd scripts (bnc#447966)
|
||||
- shuffle call to memarea_init
|
||||
- Add xdr_setsite in init scripts (bnc#459529)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 13 16:14:39 CET 2009 - hare@suse.de
|
||||
|
||||
- Do not run checkers or prioritizers on blocked devices
|
||||
(bnc#464155)
|
||||
- Implement dev_loss_tmo and fast_io_fail_tmo (bnc#464155)
|
||||
- Use default values for dev_loss_tmo and fast_io_fail_tmo
|
||||
- Display checker and prio name on failure
|
||||
- Add more debugging output
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 12 17:28:47 CET 2009 - hare@suse.de
|
||||
|
||||
- Set max_fds setting for multipath (bnc#457443)
|
||||
- Enhance error messages for checker and prio loading (bnc#456214)
|
||||
- Fix merge errors for prio_weightedpath (bnc#441007)
|
||||
- Fix sysfs_attr_get_value (bnc#456747)
|
||||
- Do not reinitialize prio and checker lists after config file
|
||||
has been parsed (bnc#464373)
|
||||
- Minor cleanups
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 4 15:05:08 CET 2008 - hare@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package multipath-tools (Version 0.4.8)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -27,7 +27,7 @@ Requires: device-mapper kpartx
|
||||
PreReq: %insserv_prereq %fillup_prereq coreutils grep diffutils
|
||||
AutoReqProv: on
|
||||
Version: 0.4.8
|
||||
Release: 27
|
||||
Release: 30
|
||||
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
||||
Source: multipath-tools-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
@ -71,6 +71,28 @@ Patch36: %{name}-prio-weightedpath
|
||||
Patch37: %{name}-crash-in-update-multipath
|
||||
Patch38: %{name}-split-off-IBM-ESS
|
||||
Patch39: %{name}-reload-map-for-ro-changes
|
||||
Patch40: %{name}-set-max_fds-parameter-for-multipath
|
||||
Patch41: %{name}-enhance-error-for-checkers
|
||||
Patch42: %{name}-fix-weightedpath-merge-error
|
||||
Patch43: %{name}-remove-kdev_t
|
||||
Patch44: %{name}-add-missing-unlock-on-exit
|
||||
Patch45: %{name}-fix-sysfs_attr_get_value
|
||||
Patch46: %{name}-more-debugging-output
|
||||
Patch47: %{name}-use-MALLOC-FREE-for-checker
|
||||
Patch48: %{name}-do-not-reinitialize-prio-and-checker-list
|
||||
Patch49: %{name}-display-checker-name-on-failure
|
||||
Patch50: %{name}-dont-run-checkers-for-blocked-devices
|
||||
Patch51: %{name}-implement-sysfs-attr-set-value
|
||||
Patch52: %{name}-implement-dev_loss_tmo
|
||||
Patch53: %{name}-use-default-for-dev_loss_tmo
|
||||
Patch54: %{name}-print-dm-tables
|
||||
Patch55: %{name}-shuffle-memarea-init
|
||||
Patch56: %{name}-start-xdr_setsite
|
||||
Patch57: %{name}-add-new-MSA-to-hwtable
|
||||
Patch58: %{name}-quote-variable-in-mkinitrd-setup
|
||||
Patch59: %{name}-update-dev_loss_tmo-handling
|
||||
Patch60: %{name}-fix-directio-error-messages
|
||||
Patch61: %{name}-update-sdev_state-handling
|
||||
|
||||
%description
|
||||
This package provides the tools to manage multipathed devices by
|
||||
@ -151,6 +173,28 @@ Authors:
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch41 -p1
|
||||
%patch42 -p1
|
||||
%patch43 -p1
|
||||
%patch44 -p1
|
||||
%patch45 -p1
|
||||
%patch46 -p1
|
||||
%patch47 -p1
|
||||
%patch48 -p1
|
||||
%patch49 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
%patch53 -p1
|
||||
%patch54 -p1
|
||||
%patch55 -p1
|
||||
%patch56 -p1
|
||||
%patch57 -p1
|
||||
%patch58 -p1
|
||||
%patch59 -p1
|
||||
%patch60 -p1
|
||||
%patch61 -p1
|
||||
|
||||
%build
|
||||
make OPTFLAGS="$RPM_OPT_FLAGS"
|
||||
@ -212,6 +256,31 @@ exit 0
|
||||
%{_mandir}/man8/kpartx.8*
|
||||
|
||||
%changelog
|
||||
* Fri Jan 23 2009 hare@suse.de
|
||||
- Update dev_loss_tmo handling (bnc#458393)
|
||||
- Fix directio error messages
|
||||
- Update sdev_state handling
|
||||
* Mon Jan 19 2009 hare@suse.de
|
||||
- Add new HP machines to hardware table (bnc#442133)
|
||||
- Print device-mapper tables for debugging
|
||||
- Properly quote variables in mkinitrd scripts (bnc#447966)
|
||||
- shuffle call to memarea_init
|
||||
- Add xdr_setsite in init scripts (bnc#459529)
|
||||
* Tue Jan 13 2009 hare@suse.de
|
||||
- Do not run checkers or prioritizers on blocked devices
|
||||
(bnc#464155)
|
||||
- Implement dev_loss_tmo and fast_io_fail_tmo (bnc#464155)
|
||||
- Use default values for dev_loss_tmo and fast_io_fail_tmo
|
||||
- Display checker and prio name on failure
|
||||
- Add more debugging output
|
||||
* Mon Jan 12 2009 hare@suse.de
|
||||
- Set max_fds setting for multipath (bnc#457443)
|
||||
- Enhance error messages for checker and prio loading (bnc#456214)
|
||||
- Fix merge errors for prio_weightedpath (bnc#441007)
|
||||
- Fix sysfs_attr_get_value (bnc#456747)
|
||||
- Do not reinitialize prio and checker lists after config file
|
||||
has been parsed (bnc#464373)
|
||||
- Minor cleanups
|
||||
* Thu Dec 04 2008 hare@suse.de
|
||||
- Split off IBM ESS hwtable entries (bnc#439763)
|
||||
- Reload map when device R/O setting changes (bnc#440959)
|
||||
|
Loading…
Reference in New Issue
Block a user