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