|
|
f20720 |
---
|
|
|
f20720 |
multipathd/cli_handlers.c | 3 ++-
|
|
|
f20720 |
multipathd/main.c | 12 ++++++------
|
|
|
f20720 |
2 files changed, 8 insertions(+), 7 deletions(-)
|
|
|
f20720 |
|
|
|
f20720 |
Index: multipath-tools-130222/multipathd/cli_handlers.c
|
|
|
f20720 |
===================================================================
|
|
|
f20720 |
--- multipath-tools-130222.orig/multipathd/cli_handlers.c
|
|
|
f20720 |
+++ multipath-tools-130222/multipathd/cli_handlers.c
|
|
|
f20720 |
@@ -632,7 +632,8 @@ cli_resize(void *v, char **reply, int *l
|
|
|
f20720 |
return 1;
|
|
|
f20720 |
|
|
|
f20720 |
dm_lib_release();
|
|
|
f20720 |
- setup_multipath(vecs, mpp);
|
|
|
f20720 |
+ if (setup_multipath(vecs, mpp) != 0)
|
|
|
f20720 |
+ return 1;
|
|
|
f20720 |
sync_map_state(mpp);
|
|
|
f20720 |
|
|
|
f20720 |
return 0;
|
|
|
f20720 |
Index: multipath-tools-130222/multipathd/main.c
|
|
|
f20720 |
===================================================================
|
|
|
f20720 |
--- multipath-tools-130222.orig/multipathd/main.c
|
|
|
f20720 |
+++ multipath-tools-130222/multipathd/main.c
|
|
|
f20720 |
@@ -134,7 +134,6 @@ coalesce_maps(struct vectors *vecs, vect
|
|
|
f20720 |
struct multipath * ompp;
|
|
|
f20720 |
vector ompv = vecs->mpvec;
|
|
|
f20720 |
unsigned int i;
|
|
|
f20720 |
- int j;
|
|
|
f20720 |
|
|
|
f20720 |
vector_foreach_slot (ompv, ompp, i) {
|
|
|
f20720 |
if (!find_mp_by_wwid(nmpv, ompp->wwid)) {
|
|
|
f20720 |
@@ -148,16 +147,17 @@ coalesce_maps(struct vectors *vecs, vect
|
|
|
f20720 |
/*
|
|
|
f20720 |
* may be just because the device is open
|
|
|
f20720 |
*/
|
|
|
f20720 |
+ if (setup_multipath(vecs, ompp) != 0) {
|
|
|
f20720 |
+ i--;
|
|
|
f20720 |
+ continue;
|
|
|
f20720 |
+ }
|
|
|
f20720 |
if (!vector_alloc_slot(nmpv))
|
|
|
f20720 |
return 1;
|
|
|
f20720 |
|
|
|
f20720 |
vector_set_slot(nmpv, ompp);
|
|
|
f20720 |
- setup_multipath(vecs, ompp);
|
|
|
f20720 |
|
|
|
f20720 |
- if ((j = find_slot(ompv, (void *)ompp)) != -1)
|
|
|
f20720 |
- vector_del_slot(ompv, j);
|
|
|
f20720 |
-
|
|
|
f20720 |
- continue;
|
|
|
f20720 |
+ vector_del_slot(ompv, i);
|
|
|
f20720 |
+ i--;
|
|
|
f20720 |
}
|
|
|
f20720 |
else {
|
|
|
f20720 |
dm_lib_release();
|