device-mapper-multipath/0149-RHBZ-1292599-restore-removed-parts.patch

83 lines
2.9 KiB
Diff
Raw Normal View History

device-mapper-multipath-0.4.9-82 - Modify 0005-RH-add-mpathconf.patch * changed warning message - Modify 0102-RHBZ-1160478-mpathconf-template.patch * updated man page - Modify 0104-RHBZ-631009-deferred-remove.patch * refactor code and minor fix - Refresh 0107-RHBZ-1169935-no-new-devs.patch - Refresh 0112-RHBZ-1194917-add-config_dir-option.patch - Refresh 0126-RHBZ-1211383-alias-collision.patch - Add 0133-RHBZ-1296979-fix-define.patch * look for the correct libudev function to set define - Add 0134-RHBZ-1241528-check-mpath-prefix.patch * only touch devices with a "mpath-" dm uuid prefix - Add 0135-RHBZ-1299600-path-dev-uevents.patch * trigger path uevent the first time a path is claimed by multipath - Add 0136-RHBZ-1304687-wait-for-map-add.patch * wait for the device to finish being added before reloading it. - Add 0137-RHBZ-1280524-clear-chkr-msg.patch - Add 0138-RHBZ-1288660-fix-mpathconf-allow.patch * don't remove existing lines from blacklist_exceptions section - Add 0139-RHBZ-1273173-queue-no-daemon-doc.patch - Add 0140-RHBZ-1299647-fix-help.patch - Add 0141-RHBZ-1303953-mpathpersist-typo.patch - Add 0142-RHBZ-1283750-kpartx-fix.patch * only remove devices if their uuid says that they are the correct partition device - Add 0143-RHBZ-1299648-kpartx-sync.patch * default to using udev sync mode - Add 0144-RHBZ-1299652-alua-pref-arg.patch * allow "exclusive_pref_bit" argument to alua prioritizer - Add 0145-UP-resize-help-msg.patch - Add 0146-UPBZ-1299651-raw-output.patch * allow raw format mutipathd show commands, that remove headers and padding - Add 0147-RHBZ-1272620-fail-rm-msg.patch - Add 0148-RHBZ-1292599-verify-before-remove.patch * verify that all partitions are unused before attempting to remove a device - Add 0149-RHBZ-1292599-restore-removed-parts.patch * don't disable kpartx when restoring the first path of a device. - Add 0150-RHBZ-1253913-fix-startup-msg.patch * wait for multipathd daemon to write pidfile before returning - Add 0151-RHBZ-1297456-weighted-fix.patch * add wwn keyword to weighted prioritizer for persistent naming - Add 0152-RHBZ-1269293-fix-blk-unit-file.patch * use "Wants" instead of "Requires" - Add 0153-RH-fix-i686-size-bug.patch * use 64-bit keycodes for multipathd client commands - Add 0154-UPBZ-1291406-disable-reinstate.patch * don't automatically reinstate ghost paths for implicit alua devices - Add 0155-UPBZ-1300415-PURE-config.patch * Add default config for PURE FlashArray - Add 0156-UPBZ-1313324-dont-fail-discovery.patch * don't fail discovery because individual paths failed. - Add 0157-RHBZ-1319853-multipath-c-error-msg.patch * better error reporting for multipath -c - Add 0158-RHBZ-1318581-timestamp-doc-fix.patch * add documentation for -T - Add 0159-UPBZ-1255885-udev-waits.patch * make multipath and kpartx wait after for udev after each command
2016-04-22 02:27:49 +00:00
---
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 */