Skip to contentSkip to conversation

More minor libmultipath fixes

PATCH In review [email protected] 2 participants 4 messages May 12, 2020 – May 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover More minor libmultipath fixes

From: Martin Wilck <[email protected]>

Hi Christophe, hi Ben,

this is a follow-up on yesterday's "Minor fixes for multipath-tools" series. It adds fixes for sporadic build failures I observed. The libsg move is a long-overdue cleanup.

Regards
Martin

Martin Wilck (2):
libmultipath: move libsg into libmultipath multipath-tools Makefile: add install dependency

 Makefile                            | 4 ++++
 libmultipath/Makefile               | 3 ++-
 libmultipath/checkers/Makefile      | 6 +++---
 libmultipath/{checkers => }/libsg.c | 0
 libmultipath/{checkers => }/libsg.h | 0
 libmultipath/prioritizers/Makefile  | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)
 rename libmultipath/{checkers => }/libsg.c (100%)
 rename libmultipath/{checkers => }/libsg.h (100%)
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/2 libmultipath: move libsg into libmultipath

From: Martin Wilck <[email protected]>

sg_read() is called from readsector0 and emc_clariion. Move it to libmultipath/, where all common code resides.

---
 libmultipath/Makefile               | 3 ++-
 libmultipath/checkers/Makefile      | 6 +++---
 libmultipath/{checkers => }/libsg.c | 0
 libmultipath/{checkers => }/libsg.h | 0
 libmultipath/prioritizers/Makefile  | 2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)
 rename libmultipath/{checkers => }/libsg.c (100%)
 rename libmultipath/{checkers => }/libsg.h (100%)
libmultipath/Makefile +2 -1
index ad690a49..f19b7ad2 100644
@@ -47,7 +47,8 @@ OBJS = memory.o parser.o vector.o devmapper.o callout.o \
 	switchgroup.o uxsock.o print.o alias.o log_pthread.o \
 	log.o configure.o structs_vec.o sysfs.o prio.o checkers.o \
 	lock.o file.o wwids.o prioritizers/alua_rtpg.o prkey.o \
-	io_err_stat.o dm-generic.o generic.o foreign.o nvme-lib.o
+	io_err_stat.o dm-generic.o generic.o foreign.o nvme-lib.o \
+	libsg.o
 
 all: $(LIBS)
 
libmultipath/checkers/Makefile +3 -3
index 02caea64..01c04510 100644
@@ -17,10 +17,10 @@ LIBS= \
 
 all: $(LIBS)
 
-libcheckdirectio.so: libsg.o directio.o
+libcheckdirectio.so: directio.o
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^ -laio
 
-libcheck%.so: libsg.o %.o
+libcheck%.so: %.o
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^
 
 install:
@@ -32,7 +32,7 @@ uninstall:
 clean: dep_clean
 	$(RM) core *.a *.o *.gz *.so
 
-OBJS := $(LIBS:libcheck%.so=%.o) libsg.o directio.o
+OBJS := $(LIBS:libcheck%.so=%.o)
 .SECONDARY: $(OBJS)
 
 include $(wildcard $(OBJS:.o=.d))
libmultipath/libsg.c renamed from libmultipath/checkers/libsg.c +0 -0
similarity index 100%
rename from libmultipath/checkers/libsg.c
rename to libmultipath/libsg.c
libmultipath/libsg.h renamed from libmultipath/checkers/libsg.h +0 -0
similarity index 100%
rename from libmultipath/checkers/libsg.h
rename to libmultipath/libsg.h
libmultipath/prioritizers/Makefile +1 -1
index 9d0fe03c..fc6e0e0c 100644
@@ -28,7 +28,7 @@ endif
 
 all: $(LIBS)
 
-libpriopath_latency.so: path_latency.o  ../checkers/libsg.o
+libpriopath_latency.so: path_latency.o
 	$(CC) $(LDFLAGS) $(SHARED_FLAGS) -o $@ $^ -lm
 
 libprio%.so: %.o
Signature · 1 line
2.26.2
#2 lore raw

PATCH 2/2 multipath-tools Makefile: add install dependency

In reply to [email protected]

From: Martin Wilck <[email protected]>

$(libdir) must exist before running "make install" on prioritizer, checker, and foreign libraries.

Cc Christian Hesse <[email protected]>
---
 Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Makefile +4 -0
index fec3b73b..8bcaba66 100644
@@ -32,6 +32,10 @@ libmultipath libdmmp: libmpathcmd
 libmpathpersist multipath multipathd: libmultipath
 mpathpersist multipathd:  libmpathpersist
 
+libmultipath/checkers.install \
+	libmultipath/prioritizers.install \
+	libmultipath/foreign.install: libmultipath.install
+
 $(BUILDDIRS.clean):
 	$(MAKE) -C ${@:.clean=} clean
 
Signature · 1 line
2.26.2
maintainer Reviewed-by on the v1 series
#3 lore raw
In reply to [email protected]
Quoted 8 lines · On Tue, May 12, 2020 at 10:38:20PM +0200, [email protected] wrote:

From: Martin Wilck <[email protected]>

Hi Christophe, hi Ben,

this is a follow-up on yesterday's "Minor fixes for multipath-tools" series. It adds fixes for sporadic build failures I observed. The libsg move is a long-overdue cleanup.

For the set

Quoted 19 lines

Regards
Martin

Martin Wilck (2):
libmultipath: move libsg into libmultipath multipath-tools Makefile: add install dependency

 Makefile                            | 4 ++++
 libmultipath/Makefile               | 3 ++-
 libmultipath/checkers/Makefile      | 6 +++---
 libmultipath/{checkers => }/libsg.c | 0
 libmultipath/{checkers => }/libsg.h | 0
 libmultipath/prioritizers/Makefile  | 2 +-
 6 files changed, 10 insertions(+), 5 deletions(-)
 rename libmultipath/{checkers => }/libsg.c (100%)
 rename libmultipath/{checkers => }/libsg.h (100%)
Signature · 1 line
2.26.2