Linux Device Mapper development
 help / color / mirror / Atom feed
* [PATCH 0/4] multipath-tools: important fixes for 0.7.5
@ 2018-03-07 23:08 Martin Wilck
  2018-03-07 23:08 ` [PATCH 1/4] libmultipath: fix crash on shutdown if io_err thread isn't running Martin Wilck
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Martin Wilck @ 2018-03-07 23:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel, Xose Vazquez Perez, Martin Wilck

Hi Christophe,

thanks for catching up. This series fixes immediate problems with
0.7.5. The first one corresponds to my previously posted
"[PATCH v3 2/2] multipathd: start marginal path checker thread lazily",
and fixes a crash. The others fix the problens reported by Xose.

Regards
Martin

Martin Wilck (4):
  libmultipath: fix crash on shutdown if io_err thread isn't running
  multipathd: fix -Wpointer-to-int-cast warning in uxlsnr
  multipath: fix clang warning in delegate_to_multipathd
  multipath-tools: build: prevent intermediate file deletion

 Makefile.inc                       | 1 +
 libmultipath/checkers/Makefile     | 2 ++
 libmultipath/foreign/Makefile      | 2 ++
 libmultipath/io_err_stat.c         | 3 +++
 libmultipath/prioritizers/Makefile | 2 ++
 multipath/main.c                   | 2 +-
 multipathd/uxlsnr.c                | 4 ++--
 tests/Makefile                     | 5 ++---
 8 files changed, 15 insertions(+), 6 deletions(-)

-- 
2.16.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] libmultipath: fix crash on shutdown if io_err thread isn't running
  2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
@ 2018-03-07 23:08 ` Martin Wilck
  2018-03-07 23:08 ` [PATCH 2/4] multipathd: fix -Wpointer-to-int-cast warning in uxlsnr Martin Wilck
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Martin Wilck @ 2018-03-07 23:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel, Xose Vazquez Perez, Martin Wilck

If we've never created the io_error checker thread, we shouldn't
cancel it.

Fixes: 160da9fa4339 "multipathd: start marginal path checker thread
lazily"

Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 libmultipath/io_err_stat.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
index ac81b4b9390d..02b1453ea527 100644
--- a/libmultipath/io_err_stat.c
+++ b/libmultipath/io_err_stat.c
@@ -793,6 +793,9 @@ destroy_ctx:
 
 void stop_io_err_stat_thread(void)
 {
+	if (io_err_stat_thr == (pthread_t)0)
+		return;
+
 	if (uatomic_read(&io_err_thread_running) == 1)
 		pthread_cancel(io_err_stat_thr);
 
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/4] multipathd: fix -Wpointer-to-int-cast warning in uxlsnr
  2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
  2018-03-07 23:08 ` [PATCH 1/4] libmultipath: fix crash on shutdown if io_err thread isn't running Martin Wilck
@ 2018-03-07 23:08 ` Martin Wilck
  2018-03-07 23:08 ` [PATCH 3/4] multipath: fix clang warning in delegate_to_multipathd Martin Wilck
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Martin Wilck @ 2018-03-07 23:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel, Xose Vazquez Perez, Martin Wilck

Fixes: "multipathd: release uxsocket and resource when cancel thread"
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipathd/uxlsnr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index 0531061912b3..cdafd82943e7 100644
--- a/multipathd/uxlsnr.c
+++ b/multipathd/uxlsnr.c
@@ -148,7 +148,7 @@ void uxsock_cleanup(void *arg)
 {
 	struct client *client_loop;
 	struct client *client_tmp;
-	int ux_sock = (int)arg;
+	long ux_sock = (long)arg;
 
 	close(ux_sock);
 
@@ -167,7 +167,7 @@ void uxsock_cleanup(void *arg)
  */
 void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, void * trigger_data)
 {
-	int ux_sock;
+	long ux_sock;
 	int rlen;
 	char *inbuf;
 	char *reply;
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/4] multipath: fix clang warning in delegate_to_multipathd
  2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
  2018-03-07 23:08 ` [PATCH 1/4] libmultipath: fix crash on shutdown if io_err thread isn't running Martin Wilck
  2018-03-07 23:08 ` [PATCH 2/4] multipathd: fix -Wpointer-to-int-cast warning in uxlsnr Martin Wilck
@ 2018-03-07 23:08 ` Martin Wilck
  2018-03-07 23:08 ` [PATCH 4/4] multipath-tools: build: prevent intermediate file deletion Martin Wilck
  2018-03-08 16:04 ` [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Xose Vazquez Perez
  4 siblings, 0 replies; 9+ messages in thread
From: Martin Wilck @ 2018-03-07 23:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel, Xose Vazquez Perez, Martin Wilck

Fixes this warning from clang:

main.c:628:11: warning: variable 'reply' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
...
main.c:609:32: note: initialize the variable 'reply' to silence this warning

Fixes: 506d253b7f89 "multipath: delegate dangerous commands to multipathd"
Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 multipath/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/multipath/main.c b/multipath/main.c
index 8732cf8bd930..716203eab56c 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -606,7 +606,7 @@ int delegate_to_multipathd(enum mpath_cmds cmd, const char *dev,
 			   enum devtypes dev_type, const struct config *conf)
 {
 	int fd;
-	char command[1024], *p, *reply;
+	char command[1024], *p, *reply = NULL;
 	int n, r = 0;
 
 	fd = mpath_connect();
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/4] multipath-tools: build: prevent intermediate file deletion
  2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
                   ` (2 preceding siblings ...)
  2018-03-07 23:08 ` [PATCH 3/4] multipath: fix clang warning in delegate_to_multipathd Martin Wilck
@ 2018-03-07 23:08 ` Martin Wilck
  2018-03-08 16:04 ` [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Xose Vazquez Perez
  4 siblings, 0 replies; 9+ messages in thread
From: Martin Wilck @ 2018-03-07 23:08 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: dm-devel, Xose Vazquez Perez, Martin Wilck

By default, "make" removes intermediate files from implicit rules
if they are the only dependency. Prevent that by using .SECONDARY.
Otherwise some files will be re-built upon second invocation of "make".

Fixes: e39283ebd79b "multipath-tools: add dependency tracking to Makefiles"
Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
 Makefile.inc                       | 1 +
 libmultipath/checkers/Makefile     | 2 ++
 libmultipath/foreign/Makefile      | 2 ++
 libmultipath/prioritizers/Makefile | 2 ++
 tests/Makefile                     | 5 ++---
 5 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index a5b9d4e3fa74..5d6123ded51a 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -127,4 +127,5 @@ check_file = $(shell	\
 	)
 
 %.o:	%.c
+	@echo building $@ because of $?
 	$(CC) $(CFLAGS) -c -o $@ $<
diff --git a/libmultipath/checkers/Makefile b/libmultipath/checkers/Makefile
index 9559038a770d..87c15bd777c3 100644
--- a/libmultipath/checkers/Makefile
+++ b/libmultipath/checkers/Makefile
@@ -40,6 +40,8 @@ clean: dep_clean
 	$(RM) core *.a *.o *.gz *.so
 
 OBJS := $(LIBS:libcheck%.so=%.o) libsg.o directio.o
+.SECONDARY: $(OBJS)
+
 include $(wildcard $(OBJS:.o=.d))
 
 dep_clean:
diff --git a/libmultipath/foreign/Makefile b/libmultipath/foreign/Makefile
index dfba11e86d76..fe98ddf7e4e9 100644
--- a/libmultipath/foreign/Makefile
+++ b/libmultipath/foreign/Makefile
@@ -24,6 +24,8 @@ clean: dep_clean
 	$(RM) core *.a *.o *.gz *.so
 
 OBJS := $(LIBS:libforeign-%.so=%.o)
+.SECONDARY: $(OBJS)
+
 include $(wildcard $(OBJS:.o=.d))
 
 dep_clean:
diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile
index b3cc944c810d..ab7bc07572ec 100644
--- a/libmultipath/prioritizers/Makefile
+++ b/libmultipath/prioritizers/Makefile
@@ -42,6 +42,8 @@ clean: dep_clean
 	$(RM) core *.a *.o *.gz *.so
 
 OBJS = $(LIBS:libprio%.so=%.o) alua_rtpg.o
+.SECONDARY: $(OBJS)
+
 include $(wildcard $(OBJS:.o=.d))
 
 dep_clean:
diff --git a/tests/Makefile b/tests/Makefile
index f6b55836a434..7ae6b9012b5a 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -21,10 +21,9 @@ clean: dep_clean
 	rm -f $(TESTS:%=%-test) $(TESTS:%=%.out) $(TESTS:%=%.o)
 
 OBJS = $(TESTS:%=%.o)
+.SECONDARY: $(OBJS)
+
 include $(wildcard $(OBJS:.o=.d))
 
-
-
-
 dep_clean:
 	$(RM) $(OBJS:.o=.d)
-- 
2.16.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] multipath-tools: important fixes for 0.7.5
  2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
                   ` (3 preceding siblings ...)
  2018-03-07 23:08 ` [PATCH 4/4] multipath-tools: build: prevent intermediate file deletion Martin Wilck
@ 2018-03-08 16:04 ` Xose Vazquez Perez
  2018-03-10  7:43   ` Christophe Varoqui
  4 siblings, 1 reply; 9+ messages in thread
From: Xose Vazquez Perez @ 2018-03-08 16:04 UTC (permalink / raw)
  To: Martin Wilck, Christophe Varoqui; +Cc: dm-devel

On 03/08/2018 12:08 AM, Martin Wilck wrote:
> Hi Christophe,
> 
> thanks for catching up. This series fixes immediate problems with
> 0.7.5. The first one corresponds to my previously posted
> "[PATCH v3 2/2] multipathd: start marginal path checker thread lazily",
> and fixes a crash. The others fix the problens reported by Xose.
> 
> Regards
> Martin
> 
> Martin Wilck (4):
>   libmultipath: fix crash on shutdown if io_err thread isn't running

These three:

>   multipathd: fix -Wpointer-to-int-cast warning in uxlsnr
>   multipath: fix clang warning in delegate_to_multipathd
>   multipath-tools: build: prevent intermediate file deletion


Tested-by: Xose Vazquez Perez <xose.vazquez@gmail.com>


>  Makefile.inc                       | 1 +
>  libmultipath/checkers/Makefile     | 2 ++
>  libmultipath/foreign/Makefile      | 2 ++
>  libmultipath/io_err_stat.c         | 3 +++
>  libmultipath/prioritizers/Makefile | 2 ++
>  multipath/main.c                   | 2 +-
>  multipathd/uxlsnr.c                | 4 ++--
>  tests/Makefile                     | 5 ++---
>  8 files changed, 15 insertions(+), 6 deletions(-)
> 

Merge them ASAP, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] multipath-tools: important fixes for 0.7.5
  2018-03-08 16:04 ` [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Xose Vazquez Perez
@ 2018-03-10  7:43   ` Christophe Varoqui
  2018-03-27 19:39     ` Michael Laß
  0 siblings, 1 reply; 9+ messages in thread
From: Christophe Varoqui @ 2018-03-10  7:43 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: device-mapper development, Martin Wilck


[-- Attachment #1.1: Type: text/plain, Size: 1405 bytes --]

The fixes and missing patches series are now merged.
The version is bumped to 0.7.6.

Thanks,
Christophe.

On Thu, Mar 8, 2018 at 5:04 PM, Xose Vazquez Perez <xose.vazquez@gmail.com>
wrote:

> On 03/08/2018 12:08 AM, Martin Wilck wrote:
> > Hi Christophe,
> >
> > thanks for catching up. This series fixes immediate problems with
> > 0.7.5. The first one corresponds to my previously posted
> > "[PATCH v3 2/2] multipathd: start marginal path checker thread lazily",
> > and fixes a crash. The others fix the problens reported by Xose.
> >
> > Regards
> > Martin
> >
> > Martin Wilck (4):
> >   libmultipath: fix crash on shutdown if io_err thread isn't running
>
> These three:
>
> >   multipathd: fix -Wpointer-to-int-cast warning in uxlsnr
> >   multipath: fix clang warning in delegate_to_multipathd
> >   multipath-tools: build: prevent intermediate file deletion
>
>
> Tested-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
>
>
> >  Makefile.inc                       | 1 +
> >  libmultipath/checkers/Makefile     | 2 ++
> >  libmultipath/foreign/Makefile      | 2 ++
> >  libmultipath/io_err_stat.c         | 3 +++
> >  libmultipath/prioritizers/Makefile | 2 ++
> >  multipath/main.c                   | 2 +-
> >  multipathd/uxlsnr.c                | 4 ++--
> >  tests/Makefile                     | 5 ++---
> >  8 files changed, 15 insertions(+), 6 deletions(-)
> >
>
> Merge them ASAP, thanks.
>

[-- Attachment #1.2: Type: text/html, Size: 2138 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] multipath-tools: important fixes for 0.7.5
  2018-03-10  7:43   ` Christophe Varoqui
@ 2018-03-27 19:39     ` Michael Laß
  2018-03-27 20:55       ` Christophe Varoqui
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Laß @ 2018-03-27 19:39 UTC (permalink / raw)
  To: dm-devel

Hi,

Am Samstag, den 10.03.2018, 08:43 +0100 schrieb Christophe Varoqui:
> The fixes and missing patches series are now merged.
> The version is bumped to 0.7.6.

could you please create a tag for 0.7.6? Or is it not officially
released yet?

Cheers,
Michael

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] multipath-tools: important fixes for 0.7.5
  2018-03-27 19:39     ` Michael Laß
@ 2018-03-27 20:55       ` Christophe Varoqui
  0 siblings, 0 replies; 9+ messages in thread
From: Christophe Varoqui @ 2018-03-27 20:55 UTC (permalink / raw)
  To: Michael Laß; +Cc: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 683 bytes --]

Done.

I also merged the most of the patchsets in the backlog after the 0.7.6 tag.
I'll wait for the "paths classification" patchset request for inclusion
before tagging the next release.

Thanks.


On Tue, Mar 27, 2018 at 9:39 PM, Michael Laß <bevan@bi-co.net> wrote:

> Hi,
>
> Am Samstag, den 10.03.2018, 08:43 +0100 schrieb Christophe Varoqui:
> > The fixes and missing patches series are now merged.
> > The version is bumped to 0.7.6.
>
> could you please create a tag for 0.7.6? Or is it not officially
> released yet?
>
> Cheers,
> Michael
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>

[-- Attachment #1.2: Type: text/html, Size: 1690 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-27 20:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
2018-03-07 23:08 ` [PATCH 1/4] libmultipath: fix crash on shutdown if io_err thread isn't running Martin Wilck
2018-03-07 23:08 ` [PATCH 2/4] multipathd: fix -Wpointer-to-int-cast warning in uxlsnr Martin Wilck
2018-03-07 23:08 ` [PATCH 3/4] multipath: fix clang warning in delegate_to_multipathd Martin Wilck
2018-03-07 23:08 ` [PATCH 4/4] multipath-tools: build: prevent intermediate file deletion Martin Wilck
2018-03-08 16:04 ` [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Xose Vazquez Perez
2018-03-10  7:43   ` Christophe Varoqui
2018-03-27 19:39     ` Michael Laß
2018-03-27 20:55       ` Christophe Varoqui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox