|
|
f20720 |
---
|
|
|
f20720 |
libmultipath/configure.c | 8 ++++++--
|
|
|
f20720 |
libmultipath/structs.h | 1 +
|
|
|
f20720 |
multipathd/main.c | 1 +
|
|
|
f20720 |
3 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
f20720 |
|
|
|
f20720 |
Index: multipath-tools-130222/libmultipath/configure.c
|
|
|
f20720 |
===================================================================
|
|
|
f20720 |
--- multipath-tools-130222.orig/libmultipath/configure.c
|
|
|
f20720 |
+++ multipath-tools-130222/libmultipath/configure.c
|
|
|
f20720 |
@@ -398,6 +398,7 @@ select_action (struct multipath * mpp, v
|
|
|
f20720 |
cmpp->alias, mpp->alias);
|
|
|
f20720 |
strncpy(mpp->alias_old, cmpp->alias, WWID_SIZE);
|
|
|
f20720 |
mpp->action = ACT_RENAME;
|
|
|
f20720 |
+ mpp->force_udev_reload = force_reload;
|
|
|
f20720 |
if (force_reload)
|
|
|
f20720 |
mpp->action = ACT_RENAME2;
|
|
|
f20720 |
return;
|
|
|
f20720 |
@@ -437,11 +438,13 @@ select_action (struct multipath * mpp, v
|
|
|
f20720 |
return;
|
|
|
f20720 |
}
|
|
|
f20720 |
if (force_reload) {
|
|
|
f20720 |
+ mpp->force_udev_reload = 1;
|
|
|
f20720 |
mpp->action = ACT_RELOAD;
|
|
|
f20720 |
condlog(3, "%s: set ACT_RELOAD (forced by user)",
|
|
|
f20720 |
mpp->alias);
|
|
|
f20720 |
return;
|
|
|
f20720 |
}
|
|
|
f20720 |
+ mpp->force_udev_reload = !pathcount(mpp, PATH_WILD);
|
|
|
f20720 |
if (cmpp->size != mpp->size) {
|
|
|
f20720 |
mpp->action = ACT_RESIZE;
|
|
|
f20720 |
condlog(3, "%s: set ACT_RESIZE (size change)",
|
|
|
f20720 |
@@ -651,7 +654,7 @@ domap (struct multipath * mpp, char * pa
|
|
|
f20720 |
case ACT_RELOAD:
|
|
|
f20720 |
r = dm_addmap_reload(mpp, params);
|
|
|
f20720 |
if (r)
|
|
|
f20720 |
- r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, MPATH_UDEV_RELOAD_FLAG);
|
|
|
f20720 |
+ r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, (mpp->force_udev_reload)? 0 : MPATH_UDEV_RELOAD_FLAG);
|
|
|
f20720 |
break;
|
|
|
f20720 |
|
|
|
f20720 |
case ACT_RESIZE:
|
|
|
f20720 |
@@ -669,7 +672,7 @@ domap (struct multipath * mpp, char * pa
|
|
|
f20720 |
if (r) {
|
|
|
f20720 |
r = dm_addmap_reload(mpp, params);
|
|
|
f20720 |
if (r)
|
|
|
f20720 |
- r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, MPATH_UDEV_RELOAD_FLAG);
|
|
|
f20720 |
+ r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, (mpp->force_udev_reload)? 0 : MPATH_UDEV_RELOAD_FLAG);
|
|
|
f20720 |
}
|
|
|
f20720 |
break;
|
|
|
f20720 |
|
|
|
f20720 |
@@ -682,6 +685,7 @@ domap (struct multipath * mpp, char * pa
|
|
|
f20720 |
* DM_DEVICE_CREATE, DM_DEVICE_RENAME, or DM_DEVICE_RELOAD
|
|
|
f20720 |
* succeeded
|
|
|
f20720 |
*/
|
|
|
f20720 |
+ mpp->force_udev_reload = 0;
|
|
|
f20720 |
if (mpp->action == ACT_CREATE) {
|
|
|
f20720 |
if (remember_wwid(mpp->wwid) == 1)
|
|
|
f20720 |
trigger_uevents(mpp);
|
|
|
f20720 |
Index: multipath-tools-130222/libmultipath/structs.h
|
|
|
f20720 |
===================================================================
|
|
|
f20720 |
--- multipath-tools-130222.orig/libmultipath/structs.h
|
|
|
f20720 |
+++ multipath-tools-130222/libmultipath/structs.h
|
|
|
f20720 |
@@ -234,6 +234,7 @@ struct multipath {
|
|
|
f20720 |
int deferred_remove;
|
|
|
f20720 |
int delay_watch_checks;
|
|
|
f20720 |
int delay_wait_checks;
|
|
|
f20720 |
+ int force_udev_reload;
|
|
|
f20720 |
unsigned int dev_loss;
|
|
|
f20720 |
uid_t uid;
|
|
|
f20720 |
gid_t gid;
|
|
|
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 |
@@ -554,6 +554,7 @@ rescan:
|
|
|
f20720 |
|
|
|
f20720 |
condlog(4,"%s: adopting all paths for path %s",
|
|
|
f20720 |
mpp->alias, pp->dev);
|
|
|
f20720 |
+ mpp->force_udev_reload = !pathcount(mpp, PATH_WILD);
|
|
|
f20720 |
if (adopt_paths(vecs->pathvec, mpp, 1))
|
|
|
f20720 |
goto fail; /* leave path added to pathvec */
|
|
|
f20720 |
|