[dm-devel] [PATCH 4/7] devmapper: wait for udev in dm_simplecmd_noflush()

Hannes Reinecke hare at suse.de
Mon May 9 10:53:02 UTC 2016


When calling dm_simplecmd_noflush() with udev_flags set we
need to set the 'need_sync' flag otherwise the udev flags
will never be set.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 libmultipath/configure.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index b976da7..9c6904a 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -628,7 +628,7 @@ domap (struct multipath * mpp, char * params)
 		r = dm_addmap_reload(mpp, params);
 		if (r)
 			r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias,
-						 0, MPATH_UDEV_RELOAD_FLAG);
+						 1, MPATH_UDEV_RELOAD_FLAG);
 		break;
 
 	case ACT_RESIZE:
@@ -646,7 +646,9 @@ domap (struct multipath * mpp, char * params)
 		if (r) {
 			r = dm_addmap_reload(mpp, params);
 			if (r)
-				r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias, 0, MPATH_UDEV_RELOAD_FLAG);
+				r = dm_simplecmd_noflush(DM_DEVICE_RESUME,
+							 mpp->alias, 1,
+							 MPATH_UDEV_RELOAD_FLAG);
 		}
 		break;
 
-- 
2.6.6




More information about the dm-devel mailing list