You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

82 lines
2.9 KiB

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