libmultipath: Fixup 'DM_DEVICE_RELOAD' handling
authorHannes Reinecke <hare@suse.de>
Mon, 9 May 2016 10:53:05 +0000 (12:53 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 10 May 2016 05:57:21 +0000 (07:57 +0200)
commitd569988e7528cf3484b6acae19dc093de41a2488
treeb0d921cac935d5b6f3836d34a283cc082128bacb
parentfec754d5d6786def2a011418f106bddd09ec3527
libmultipath: Fixup 'DM_DEVICE_RELOAD' handling

libdevmapper has the 'quirk' that DM_DEVICE_CREATE is translated
internally into a create/load/resume sequence, and the associated
cookie will wait for the last 'resume' to complete.
However, DM_DEVICE_RELOAD has no such translation, so if there
is a cookie assigned to it the caller _cannot_ wait for it,
as the cookie will only ever be completed upon the next
DM_DEVICE_RESUME.
multipathd already has some provisions for that (but even there
the cookie handling is dodgy), but 'multipath -r' doesn't know
about this.
So to avoid any future irritations this patch updates the
dm_addmad_reload() call to handle the call to DM_DEVICE_RESUME
correctly and removes the special handling from domap().

Signed-off-by: Hannes Reinecke <hare@suse.de>
libmultipath/configure.c
libmultipath/devmapper.c
libmultipath/devmapper.h