some minor multipath-tools fixes
cover some minor multipath-tools fixes
Fix some glitches that were discovered recently here at SUSE.
Martin Wilck (3):
kpartx/devmapper.h: remove dm_no_partitions
libmultipath: cli_add_map: Use CMD_NONE
multipath-tools: link internal libraries before foreigns
kpartx/devmapper.h | 1 - mpathpersist/Makefile | 4 ++-- multipath/Makefile | 4 ++-- multipathd/Makefile | 4 ++-- multipathd/cli_handlers.c | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
2.14.0
PATCH 1/3 kpartx/devmapper.h: remove dm_no_partitions
This removes the deleted function from the header file.
--- kpartx/devmapper.h | 1 - 1 file changed, 1 deletion(-)
kpartx/devmapper.h +0 -1
@@ -19,6 +19,5 @@ dev_t dm_get_first_dep(char *devname);char *dm_mapuuid (const char *mapname);int dm_devn (const char * mapname,int *major,int *minor);int dm_remove_partmaps (char * mapname,char *uuid,dev_t devt,int verbose); -int dm_no_partitions (char * mapname);#endif /* _KPARTX_DEVMAPPER_H */
Signature · 1 line
2.14.0
PATCH 2/3 libmultipath: cli_add_map: Use CMD_NONE
In reply to Martin WilckCommands issued from the daemon itself should always pass CMD_NONE to coalesce_paths. Otherwise, the daemon mistakenly tries to talk to itself via the socket, causing deadlock.
Reproduce simply by calling "multipathd add map $X".
--- multipathd/cli_handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
multipathd/cli_handlers.c +1 -1
@@ -782,7 +782,7 @@ cli_add_map (void * v, char ** reply, int * len, void * data) vecs->pathvec, &refwwid);if (refwwid) {if (coalesce_paths (vecs,NULL , refwwid, -FORCE_RELOAD_NONE ,1 )) +FORCE_RELOAD_NONE ,CMD_NONE ))condlog (2 ,"%s: coalesce_paths failed" , param);dm_lib_release ();
Signature · 1 line
2.14.0
PATCH 3/3 multipath-tools: link internal libraries before foreigns
In reply to Martin WilckOtherwise, the runtime linker may resolve foreign symbols instead of internal ones for certain symbol names (observed with xfree() from libreadline).
--- mpathpersist/Makefile | 4 ++-- multipath/Makefile | 4 ++-- multipathd/Makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
mpathpersist/Makefile +2 -2
@@ -3,8 +3,8 @@ include ../Makefile.inc CFLAGS += $(BIN_CFLAGS) -I$(multipathdir) -I$(mpathpersistdir) LDFLAGS += $(BIN_LDFLAGS) -LIBDEPS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ - -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev +LIBDEPS += -L$(mpathpersistdir) -lmpathpersist -L$(multipathdir) -lmultipath \ + -L$(mpathcmddir) -lmpathcmd -lpthread -ldevmapper -ludev EXEC = mpathpersist
multipath/Makefile +2 -2
@@ -5,8 +5,8 @@ include ../Makefile.inc CFLAGS += $(BIN_CFLAGS) -I$(multipathdir) -I$(mpathcmddir) LDFLAGS += $(BIN_LDFLAGS) -LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ - -L$(mpathcmddir) -lmpathcmd +LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathcmddir) -lmpathcmd \ + -lpthread -ldevmapper -ldl -ludev EXEC = multipath
multipathd/Makefile +2 -2
@@ -9,8 +9,8 @@ include ../Makefile.inc CFLAGS += $(BIN_CFLAGS) -I$(multipathdir) -I$(mpathpersistdir) \ -I$(mpathcmddir) -I$(thirdpartydir) LDFLAGS += $(BIN_LDFLAGS) -LIBDEPS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ - -lmpathpersist -L$(mpathcmddir) -lmpathcmd -lurcu -lpthread \ +LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \ + -L$(mpathcmddir) -lmpathcmd -ludev -ldl -lurcu -lpthread \ -ldevmapper -lreadline ifdef SYSTEMD
Signature · 1 line
2.14.0