[dm-devel] [PATCH 6/8] libmultipath: improve checks for set_str

2021-10-06 Thread Benjamin Marzinski
aracter in file/directory names. This patch adds seperate handlers for these three cases. If a config line is invalid, these handlers retain the existing config string, if any. Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c | 88 +++-- 1 file c

[dm-devel] [PATCH 7/8] libmultipath: split set_int to enable reuse

2021-10-06 Thread Benjamin Marzinski
Split the code that does the actual value parsing out of set_int(), into a helper function, do_set_int(), so that it can be used by other handlers. These functions no longer set the config value at all, when they have invalid input. Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c | 82

[dm-devel] [PATCH 8/8] libmultipath: cleanup invalid config handling

2021-10-06 Thread Benjamin Marzinski
ff-by: Benjamin Marzinski --- libmultipath/dict.c | 73 +++-- 1 file changed, 51 insertions(+), 22 deletions(-) diff --git a/libmultipath/dict.c b/libmultipath/dict.c index e79fcdd7..8c3b5f72 100644 --- a/libmultipath/dict.c +++ b/libmultipath/dict.c @@ -199,8 +1

[dm-devel] [PATCH 4/8] libmultipath: pass file and line number to keyword handlers

2021-10-06 Thread Benjamin Marzinski
This will make it possible for the keyword handlers to print more useful warning messages. It will be used by future patches. Signed-off-by: Benjamin Marzinski --- libmultipath/dict.c | 143 +- libmultipath/parser.c | 3 +- libmultipath/parser.h | 2

[dm-devel] [PATCH 1/8] libmulitpath: add section name to invalid keyword output

2021-10-06 Thread Benjamin Marzinski
with a closing brace). This can confuse users. To make this easier to understand, when multipath prints and invalid keyword message, it now also prints the current section name, which can give users a hint that they didn't end the previous section. Signed-off-by: Benjamin Marzinski --- li

[dm-devel] [PATCH 0/8] improving config parsing warnings

2021-10-06 Thread Benjamin Marzinski
changing them. Benjamin Marzinski (8): libmulitpath: add section name to invalid keyword output libmultipath: use typedef for keyword handler function libmultipath: print the correct file when parsing fails libmultipath: pass file and line number to keyword handlers libmultipath: make

[dm-devel] [PATCH 3/8] libmultipath: print the correct file when parsing fails

2021-10-06 Thread Benjamin Marzinski
Don't assume that parsing failed on multipath.conf Signed-off-by: Benjamin Marzinski --- libmultipath/parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/parser.c b/libmultipath/parser.c index ebe1cbd9..d5595fb0 100644 --- a/libmultipath/parser.c

[dm-devel] [PATCH v2 1/4] multipathd: move delayed_reconfig out of struct config

2021-10-06 Thread Benjamin Marzinski
delayed_reconfig was inside the config struct, but it wasn't updated during an RCU write section, so there's no synchronization on it. Instead, pull it out of the config structure, and use the config_lock to synchronize it. Signed-off-by: Benjamin Marzinski --- libmultipath/con

[dm-devel] [PATCH v2 0/4] Add "reconfigure all" multipath command

2021-10-06 Thread Benjamin Marzinski
ded text to the multipathd man page to explain the two types of reconfigure. Benjamin Marzinski (4): multipathd: move delayed_reconfig out of struct config multipathd: remove reconfigure from header file. multipathd: pass in the type of reconfigure multipathd: add "reconfigure al

[dm-devel] [PATCH v2 4/4] multipathd: add "reconfigure all" command.

2021-10-06 Thread Benjamin Marzinski
With this commit, multipathd no longer defaults to full reconfigures for the "reconfigure" command and the HUP signal. The default is a weak reconfigure. A new command, "reconfigure all", has been added to do a full reconfigure. Signed-off-by: Benjamin Marzinski -

[dm-devel] [PATCH v2 2/4] multipathd: remove reconfigure from header file.

2021-10-06 Thread Benjamin Marzinski
Only multipathd/main.c uses it. Signed-off-by: Benjamin Marzinski --- multipathd/main.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multipathd/main.h b/multipathd/main.h index 23ce919e..a1697a74 100644 --- a/multipathd/main.h +++ b/multipathd/main.h @@ -39,7 +39,6 @@ enum daemon_status

[dm-devel] [PATCH v2 3/4] multipathd: pass in the type of reconfigure

2021-10-06 Thread Benjamin Marzinski
been requested but not started, weak reconfigure requests will be upgraded. A future patch will enable users to control what kind of reconfigures happen. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 2 +- multipathd/cli_handlers.c | 2 +- multipathd/main.c

Re: [dm-devel] [PATCH 0/4] Add "reconfigure all" multipath command

2021-09-27 Thread Benjamin Marzinski
On Fri, Sep 24, 2021 at 10:44:46PM +0200, Xose Vazquez Perez wrote: > On 9/21/21 01:21, Benjamin Marzinski wrote: > > >This patchset is supposed to replace Martin's > > > >multipathd: add "force_reconfigure" option > > > >patch from his

[dm-devel] [PATCH 3/4] multipathd: pass in the type of reconfigure

2021-09-20 Thread Benjamin Marzinski
been requested but not started, weak reconfigure requests will be upgraded. A future patch will enable users to control what kind of reconfigures happen. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 2 +- multipathd/cli_handlers.c | 2 +- multipathd/main.c

[dm-devel] [PATCH 4/4] multipathd: add "reconfigure all" command.

2021-09-20 Thread Benjamin Marzinski
With this commit, multipathd no longer defaults to full reconfigures for the "reconfigure" command and the HUP signal. The default is a weak reconfigure. A new command, "reconfigure all", has been added to do a full reconfigure. Signed-off-by: Benjamin Marzinski -

[dm-devel] [PATCH 2/4] multipathd: remove reconfigure from header file.

2021-09-20 Thread Benjamin Marzinski
Only multipathd/main.c uses it. Signed-off-by: Benjamin Marzinski --- multipathd/main.h | 1 - 1 file changed, 1 deletion(-) diff --git a/multipathd/main.h b/multipathd/main.h index 23ce919e..a1697a74 100644 --- a/multipathd/main.h +++ b/multipathd/main.h @@ -39,7 +39,6 @@ enum daemon_status

[dm-devel] [PATCH 1/4] multipathd: move delayed_reconfig out of struct config

2021-09-20 Thread Benjamin Marzinski
delayed_reconfig was inside the config struct, but it wasn't updated during an RCU write section, so there's no synchronization on it. Instead, pull it out of the config structure, and use the config_lock to synchronize it. Signed-off-by: Benjamin Marzinski --- libmultipath/con

[dm-devel] [PATCH 0/4] Add "reconfigure all" multipath command

2021-09-20 Thread Benjamin Marzinski
ly be switch to use a new DAEMON_CONFIGURE_ALL state instead. The final patch, that added the new command, is meant to apply on top of Martin's changed client handler code. I can send one that works with the current client handler code, if people would rather review that. Benjamin Mar

Re: [dm-devel] [PATCH 31/35] multipathd: uxlsnr: add idle notification

2021-09-16 Thread Benjamin Marzinski
On Thu, Sep 16, 2021 at 05:54:14PM +0200, Martin Wilck wrote: > On Thu, 2021-09-16 at 10:06 -0500, Benjamin Marzinski wrote: > > On Thu, Sep 16, 2021 at 10:54:19AM +0200, Martin Wilck wrote: > > > On Wed, 2021-09-15 at 23:14 -0500, Benjamin Marzinski wrote: > > > >

Re: [dm-devel] [PATCH 31/35] multipathd: uxlsnr: add idle notification

2021-09-16 Thread Benjamin Marzinski
On Thu, Sep 16, 2021 at 10:54:19AM +0200, Martin Wilck wrote: > On Wed, 2021-09-15 at 23:14 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 10, 2021 at 01:41:16PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > The previous patches add

Re: [dm-devel] [PATCH 33/35] multipathd: uxlsnr: use poll loop for sending, too

2021-09-16 Thread Benjamin Marzinski
On Thu, Sep 16, 2021 at 11:33:29AM +0200, Martin Wilck wrote: > On Wed, 2021-09-15 at 23:22 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 10, 2021 at 01:41:18PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > send_packet() may busy-

Re: [dm-devel] [PATCH 32/35] multipathd: uxlsnr: add timeout handling

2021-09-16 Thread Benjamin Marzinski
On Thu, Sep 16, 2021 at 10:58:36AM +0200, Martin Wilck wrote: > On Wed, 2021-09-15 at 23:17 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 10, 2021 at 01:41:17PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > Our ppoll() call needs to wak

Re: [dm-devel] [PATCH 14/35] multipathd: add "force_reconfigure" option

2021-09-16 Thread Benjamin Marzinski
On Thu, Sep 16, 2021 at 09:34:46AM +0200, Martin Wilck wrote: > On Wed, 2021-09-15 at 19:13 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 10, 2021 at 01:40:59PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > Since e3270f7 ("multipa

Re: [dm-devel] [PATCH 05/35] libmultipath: improve cleanup of uevent queues on exit

2021-09-16 Thread Benjamin Marzinski
On Thu, Sep 16, 2021 at 09:10:57AM +0200, Martin Wilck wrote: > On Wed, 2021-09-15 at 17:20 -0500, Benjamin Marzinski wrote: > > On Fri, Sep 10, 2021 at 01:40:50PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > uevents listed on merge_n

Re: [dm-devel] [PATCH 31/35] multipathd: uxlsnr: add idle notification

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:16PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The previous patches added the state machine and the timeout handling, > but there was no wakeup mechanism for the uxlsnr for cases where > client connections were waiting for the vecs lock. > > This patch

Re: [dm-devel] [PATCH 06/35] multipathd: fix systemd notification when stopping while reloading

2021-09-15 Thread Benjamin Marzinski
ce as stopped. Subsequent attempts > to start multipathd via socket activation fail until systemd times > out the reload operation. > > The problem can be reproduced by running "multipathd shutdown" > quickly after "multipathd reconfigure". > Reviewed-by

Re: [dm-devel] [PATCH 35/35] multipathd: uxclt: allow client mode for non-root, too

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:20PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The server checks for root permissions anyway. "multipathd -k" > should work for ordinary users as long as no priviledged commands > are executed. > Reviewed-by: Benjamin Marzin

Re: [dm-devel] [PATCH 34/35] multipathd: uxlsnr: drop client_lock

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:19PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The list of clients is never changed anywhere except in > uxsock_listen(). No need to lock. > > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 21 ++--- > 1 file changed, 2 inse

Re: [dm-devel] [PATCH 33/35] multipathd: uxlsnr: use poll loop for sending, too

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:18PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > send_packet() may busy-loop. By polling for POLLOUT, we can > avoid that, even if it's very unlikely in practice. > > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 39 +

Re: [dm-devel] [PATCH 32/35] multipathd: uxlsnr: add timeout handling

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:17PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Our ppoll() call needs to wake up when a client request times out. > This logic can be added by determining the first client that's about > to time out. The logic in handle_client() will then cause a timeout

Re: [dm-devel] [PATCH 30/35] multipathd: uxlsnr: merge uxsock_trigger() into state machine

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:15PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > This patch sets up the bulk of the state machine. The idea is to > fall through the case labels as long as possible (when steps succeed) > and return to the caller if either an error occurs, or it becomes >

Re: [dm-devel] [PATCH 29/35] multipathd: uxlsnr: use parser to determine non-root commands

2021-09-15 Thread Benjamin Marzinski
hat non-root users may execute. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 27 +-- > 1 file changed, 17 insertions(+), 10 deletions(-) > > diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c > index cfff0

Re: [dm-devel] [PATCH 27/35] multipathd: uxlsnr: pass struct client to uxsock_trigger() and parse_cmd()

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:12PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > As a next step towards the state machine, give the handler functions > access to the state of the client connection. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck &

Re: [dm-devel] [PATCH 28/35] multipathd: uxlsnr: move handler execution to separate function

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:13PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Move the actual execution of the handler out of parse_cmd(). For now, > we do it in uxsock_trigger(). > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 26/35] multipathd: uxlsnr: check root on connection startup

2021-09-15 Thread Benjamin Marzinski
that time. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c > index 9a945ea..9cf6964 100644 > --- a/multip

Re: [dm-devel] [PATCH 25/35] multipathd: use strbuf in cli_handler functions

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:10PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > This allows us to simplify callers by not having to track the > reply length separately. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipa

Re: [dm-devel] [PATCH 23/35] multipathd: uxlsnr: move client handling to separate function

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:08PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > No functional changes at this point. handle_client() will become > the state machine for handling client requests. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski &

Re: [dm-devel] [PATCH 24/35] multipathd: uxlsnr: use main poll loop for receiving

2021-09-15 Thread Benjamin Marzinski
s > the command length, and later on it reads the command itself > piece-wise, as sent by the client. This will be just a single > read in most cases, but not always. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH 22/35] multipathd: uxlsnr: remove check_timeout()

2021-09-15 Thread Benjamin Marzinski
l functionality. > The start_time variable should probably get remove from uxsock_listen here instead of the next patch, but it doesn't actually hurt anything, so Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 21 -

Re: [dm-devel] [PATCH 21/35] multipathd: move parse_cmd() to uxlsnr.c

2021-09-15 Thread Benjamin Marzinski
move it to uxlsnr.c, > where later patches will move some functionality elsewhere. > > No functional changes. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/cli.c| 74 + > multipathd/c

Re: [dm-devel] [PATCH 20/35] multipathd: move uxsock_trigger() to uxlsnr.c

2021-09-15 Thread Benjamin Marzinski
lid any more. Moving > the function to cli.c allows restructuring the code. > > No functional changes. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 44 +--

Re: [dm-devel] [PATCH 19/35] multipathd: uxlsnr: data structure for stateful client connection

2021-09-15 Thread Benjamin Marzinski
> waits only in place, the ppoll() call in uxsock_listen(). > > For now, we just introduce and initialize the fields. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 27 +-- > 1 file changed, 25 ins

Re: [dm-devel] [PATCH 18/35] multipathd: uxlsnr: avoid using fd -1 in ppoll()

2021-09-15 Thread Benjamin Marzinski
gt; actually interested in it. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c > index 6506109..98a

Re: [dm-devel] [PATCH 17/35] multipathd: uxlsnr: use symbolic values for pollfd indices

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:41:02PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Avoid hardcoding the indices as 0, 1, 2... > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/uxlsnr.c | 25 +++-- > 1 fil

Re: [dm-devel] [PATCH 16/35] multipathd: uxlsnr: handle client HUP

2021-09-15 Thread Benjamin Marzinski
description > of POLLHUP in poll(2). > > Close connections immediately if HUP is received. > > Also, use the fd in log messages to identify the client rather > than the random index. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > mult

Re: [dm-devel] [PATCH 15/35] multipathd: uxlsnr: avoid stalled clients during reconfigure

2021-09-15 Thread Benjamin Marzinski
7cc1d3 ("multipathd: fix client response for socket activation") Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 9 + > multipathd/uxlsnr.c | 12 > 2 files changed, 9 insertions(+), 12 deletions(-) >

Re: [dm-devel] [PATCH 14/35] multipathd: add "force_reconfigure" option

2021-09-15 Thread Benjamin Marzinski
reconfigure all the devices. My personal preference would be to leave force_reconfigure off by default, so that we keep the same behavior, and add a command to force a full reconfig. I'll try to work up a patch with my idea that can apply on top of this. But the code itself looks fine, and

Re: [dm-devel] [PATCH 13/35] multipathd: cli.c: use ESRCH for "command not found"

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:58PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > EAGAIN is too generic, and doesn't fit semantically either. > ESRCH in't used anywhere else in our code. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck &

Re: [dm-devel] [PATCH 12/35] multipathd: add and set cli_handlers in a single step

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:57PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Modify set_handler_callback() such that a missing slot is created > if no matching slot is found. This way, we can skip the initialization > with NULL handlers on startup. > > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH 11/35] multipathd: make all cli_handlers static

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:56PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > The cli_handler functions are only called from the handler table and > need not be exported. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipa

Re: [dm-devel] [PATCH 10/35] multipathd: add prototype for cli_handler functions

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:55PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Use a typedef instead of spelling out the function type everywhere. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/cli.c | 6 +++--- >

Re: [dm-devel] [PATCH 09/35] multipathd: cli_del_map: fix reply for delayed action

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:54PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Return code 2 from ev_remove_map means that a delayed remove has > been started, which is not the same as failure. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck &

Re: [dm-devel] [PATCH 08/35] multipathd: cli.h: formatting improvements

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:53PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > No functional changes. Just make the code a little easier to read. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 07/35] multipathd: improve delayed reconfigure

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:52PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > When a reconfigure operation is requested, either by the admin > or by some condition multipathd encounters, the current code > attempts to set DAEMON_CONFIGURE state and gives up after a second > if it does

Re: [dm-devel] [PATCH 05/35] libmultipath: improve cleanup of uevent queues on exit

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:50PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > uevents listed on merge_node must be cleaned up, too. uevents > cancelled while being serviced and temporary queues, likewise. > The global uevq must be cleaned out in the uevent listener thread, > because i

Re: [dm-devel] [PATCH 04/35] libmultipath: print: add __snprint_config()

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:49PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > exactly like snprint_config(), but takes a struct strbuf * as argument. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/libm

Re: [dm-devel] [PATCH 03/35] libmultipath: add optional wakeup functionality to lock.c

2021-09-15 Thread Benjamin Marzinski
waiter_lock into a regular pthread_mutex_t, since it doesn't need any special handling, but this change doesn't cause any problems with it, so Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/libmultipath.version | 5 + >

Re: [dm-devel] [PATCH 02/35] libmultipath: add trylock() helper

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:47PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Add a small helper. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/lock.h | 5 + > 1 file changed, 5 insertions(+) > > diff

Re: [dm-devel] [PATCH 01/35] libmultipath: add timespeccmp() utility function

2021-09-15 Thread Benjamin Marzinski
On Fri, Sep 10, 2021 at 01:40:46PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Add a small utility that will be used in later patches. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/libmultipath.version | 5 + >

Re: [dm-devel] [PATCH v2] multipathd: fix missing persistent reseravtion for active path

2021-09-13 Thread Benjamin Marzinski
On Mon, Sep 13, 2021 at 09:01:11AM +0200, Martin Wilck wrote: > Hello lixiaokeng, > > On Mon, 2021-09-13 at 10:43 +0800, lixiaokeng wrote: > > There are two paths(sucu as sda and adb) for one LUN. The two > > paths log in, but before the two uevents have been processed > > (for example there are m

Re: [dm-devel] [PATCH] multipathd: fix missing persistent reseravtion for active path

2021-09-13 Thread Benjamin Marzinski
On Sat, Sep 11, 2021 at 09:13:27PM +0200, Martin Wilck wrote: > On Sat, 2021-09-11 at 11:28 +0800, lixiaokeng wrote: > > > > > > On 2021/9/11 0:17, Martin Wilck wrote: > > > Hello lixiaokeng, > > > > > > thanks for your patch. > > > > > > On Fri, 2021-09-10 at 20:31 +0800, lixiaokeng wrote: > >

Re: [dm-devel] [PATCH 0/3] multipath-tools: final touces before next PR

2021-09-07 Thread Benjamin Marzinski
On Tue, Sep 07, 2021 at 08:56:33AM +0200, mwi...@suse.com wrote: > From: Martin Wilck Reviewed-by: Benjamin Marzinski for the set. > > Hello Christophe, hello Ben, > > here are a few final small fixes for the next multipath-tools PR: > https://github.com/opensvc/multi

Re: [dm-devel] [PATCH v2 6/6] libmultipath: drop unnecessary parameter from remove_map()

2021-09-03 Thread Benjamin Marzinski
On Fri, Sep 03, 2021 at 03:22:45PM +, Martin Wilck wrote: > On Fri, 2021-09-03 at 11:28 +0200, Martin Wilck wrote: > > On Thu, 2021-09-02 at 16:57 -0500, Benjamin Marzinski wrote: > > > When remove_map() is called, if the multipath device is in a mpvec, > > > it &g

[dm-devel] [PATCH v2 6/6] libmultipath: drop unnecessary parameter from remove_map()

2021-09-02 Thread Benjamin Marzinski
gt;mpvec, calling it with KEEP_VEC would be a bug, since it would leave a pointer to the freed device in the vector. Signed-off-by: Benjamin Marzinski --- libmpathpersist/mpath_persist.c | 2 +- libmultipath/configure.c| 13 ++--- libmultipath/structs_vec.c | 12 ++-- libm

[dm-devel] [PATCH v2 4/6] libmultipath: remove unneeded code in coalesce_paths

2021-09-02 Thread Benjamin Marzinski
f they could, there's no point in creating/reloading the device and then immediately removing it. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 46 1 file changed, 46 deletions(-) diff --git a/libmultipath/

[dm-devel] [PATCH v2 0/6] Mulitpath: miscellaneous patches

2021-09-02 Thread Benjamin Marzinski
6: New patch to simplify code that I noticed while reworking patch 3/6. Benjamin Marzinski (6): multipath.conf: fix typo in ghost_delay description mpathpersist: fail commands when no usable paths exist multipath: print warning if multipathd is not running. libmultipath: remove u

[dm-devel] [PATCH v2 5/6] libmultipath: deal with dynamic PTHREAD_STACK_MIN

2021-09-02 Thread Benjamin Marzinski
signedness, since stacksize is a size_t. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/util.c b/libmultipath/util.c index e2fafe85..ea858409 100644 --- a/libmultipath/util.c

[dm-devel] [PATCH v2 3/6] multipath: print warning if multipathd is not running.

2021-09-02 Thread Benjamin Marzinski
If multipath notices that multipath devices exist or were created, and multipathd is not running, it now prints a warning message, so users are notified of the issue. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 3 ++- libmultipath/configure.h | 1

[dm-devel] [PATCH v2 2/6] mpathpersist: fail commands when no usable paths exist

2021-09-02 Thread Benjamin Marzinski
"mpathpersist -oCK " will return success if it is run on devices with no usable paths, but nothing is actually done. The -L command will fail, but it should give up sooner, and with a more helpful error message. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmp

[dm-devel] [PATCH v2 1/6] multipath.conf: fix typo in ghost_delay description

2021-09-02 Thread Benjamin Marzinski
Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 064e4826..d6b8c7f6 100644 --- a/multipath/multipath.conf.5 +++ b/multipath

Re: [dm-devel] [PATCH] libmultipath: avoid buffer size warning with systemd 240+

2021-08-30 Thread Benjamin Marzinski
e return value to avoid a misleading > "failed to increase buffer size" warning. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/uevent.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libmultipath/ueven

Re: [dm-devel] [PATCH 3/5] multipath: print warning if multipathd is not running.

2021-08-30 Thread Benjamin Marzinski
On Thu, Aug 12, 2021 at 10:23:09AM +, Martin Wilck wrote: > On Do, 2021-07-29 at 16:46 -0500, Benjamin Marzinski wrote: > > If multipath notices that multipath devices exist or were created, > > and > > multipathd is not running, it now prints a warning message, so users

Re: [dm-devel] [PATCH v2 5/9] libmultipath: use strbuf in print.c

2021-08-30 Thread Benjamin Marzinski
rather than printing the indent >repeatedly. > - snprint_blacklist_group(), snprint_blacklist_devgroup(): combined two >print statements into one. > > In cli_handlers.c, fixed the returned values for the "len" parameter in > some functions (it's

Re: [dm-devel] [PATCH v2 4/9] libmultipath: use strbuf in dict.c

2021-08-30 Thread Benjamin Marzinski
On Wed, Aug 11, 2021 at 05:41:45PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Temporary solution for snprint_keyword(), as print.c hasn't been migrated yet. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > li

Re: [dm-devel] [PATCH v2 3/9] libmultipath: variable-size parameters in assemble_map()

2021-08-30 Thread Benjamin Marzinski
changed. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/configure.c | 18 ++-- > libmultipath/configure.h | 3 +- > libmultipath/dmparser.c | 47 ++- > libmultipath/dm

Re: [dm-devel] [PATCH v2 2/9] libmultipath: strbuf: simple api for growing string buffers

2021-08-30 Thread Benjamin Marzinski
; > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/Makefile | 2 +- > libmultipath/strbuf.c | 207 + > libmultipath/strbuf.h | 168 + > tests/Makefile|

Re: [dm-devel] [PATCH v2 1/9] libmultipath: variable-size parameters in dm_get_map()

2021-08-30 Thread Benjamin Marzinski
Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/devmapper.c | 44 --- > libmultipath/devmapper.h | 4 +-- > libmultipath/libmultipath.version | 6 + > libmultipath/structs_vec.c| 11 +++

Re: [dm-devel] [PATCH 4/9] libmultipath: use strbuf in dict.c

2021-08-30 Thread Benjamin Marzinski
On Wed, Aug 11, 2021 at 05:27:05PM +0200, Martin Wilck wrote: > On Mi, 2021-07-28 at 14:03 -0500, Benjamin Marzinski wrote: > > On Thu, Jul 15, 2021 at 12:52:18PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > Temporary solution for snpri

[dm-devel] [PATCH 2/5] mpathpersist: fail commands when no usable paths exist

2021-07-29 Thread Benjamin Marzinski
"mpathpersist -oCK " will return success if it is run on devices with no usable paths, but nothing is actually done. The -L command will fail, but it should give up sooner, and with a more helpful error message. Signed-off-by: Benjamin Marzinski --- libmpathpersist/mpath_per

[dm-devel] [PATCH 3/5] multipath: print warning if multipathd is not running.

2021-07-29 Thread Benjamin Marzinski
If multipath notices that multipath devices exist or were created, and multipathd is not running, it now prints a warning message, so users are notified of the issue. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 13 +++-- libmultipath/configure.h

[dm-devel] [PATCH 1/5] multipath.conf: fix typo in ghost_delay description

2021-07-29 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 064e4826..d6b8c7f6 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5

[dm-devel] [PATCH 5/5] libmultipath: deal with dynamic PTHREAD_STACK_MIN

2021-07-29 Thread Benjamin Marzinski
signedness, since stacksize is a size_t. Signed-off-by: Benjamin Marzinski --- libmultipath/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/util.c b/libmultipath/util.c index e2fafe85..ea858409 100644 --- a/libmultipath/util.c +++ b/libmultipath/util.c

[dm-devel] [PATCH 0/5] Mulitpath: miscellaneous patches

2021-07-29 Thread Benjamin Marzinski
Here are a couple of unconnected patches. They (at least libmultipath.version) are meant to be applied on top of Martin's recent patchset. Benjamin Marzinski (5): multipath.conf: fix typo in ghost_delay description mpathpersist: fail commands when no usable paths exist multipath:

[dm-devel] [PATCH 4/5] libmultipath: remove unneeded code in coalesce_paths

2021-07-29 Thread Benjamin Marzinski
f they could, there's no point in creating/reloading the device and then immediately removing it. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 46 1 file changed, 46 deletions(-) diff --git a/libmultipath/configure.c b/libmultipath/

Re: [dm-devel] [PATCH 9/9] multipathd: use strbuf in cli.c

2021-07-29 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:23PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Here, too, strbuf can be used to simplify code. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/cli.c | 94 ++---

Re: [dm-devel] [PATCH 8/9] libmultipath: use strbuf in alias.c.

2021-07-29 Thread Benjamin Marzinski
g > the test cases themselves. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libmultipath/alias.c | 84 +++- > tests/alias.c| 41 + > 2 files changed, 63 insertions(+), 62 deletions(-) &

Re: [dm-devel] [PATCH 7/9] libmultipath: print.h: move macros to print.c

2021-07-28 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:21PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Move all macros to print.c that aren't used in other source files. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- >

Re: [dm-devel] [PATCH 6/9] libmultipath: print.c: fail hard if keywords are not found

2021-07-28 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:20PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > A failure in find_keyword() means an internal error. Fail hard rather > than returning an empty string. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > li

Re: [dm-devel] [PATCH 5/9] libmultipath: use strbuf in print.c

2021-07-28 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:19PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Use the strbuf API in print.c, wherever growing string buffers are > appropriate. This requires a large amount of changes in print.c itself, > and in other files that use functions from print.c. It makes no

Re: [dm-devel] [PATCH 4/9] libmultipath: use strbuf in dict.c

2021-07-28 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:18PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Temporary solution for snprint_keyword(), as print.c hasn't been migrated yet. Mostly good. I have some minor issues with this. > > Signed-off-by: Martin Wilck > --- > libmultipath/dict.c| 313 +

Re: [dm-devel] [PATCH 3/9] libmultipath: variable-size parameters in assemble_map()

2021-07-28 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:17PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Instead of using fixed PARAMS_SIZE-sized arrays for parameters, use > dynamically allocated memory. > > The library version needs to be bumped, because setup_map() argument > list has changed. > Looks goo

Re: [dm-devel] [PATCH 2/9] libmultipath: strbuf: simple api for growing string buffers

2021-07-26 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:16PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Add an API for string buffers that grow in size as text is added. > This API will be useful in several places of the multipath-tools code > base. Add unit tests for these helpers, too. > This looks good. I

Re: [dm-devel] [PATCH 1/9] libmultipath: variable-size parameters in dm_get_map()

2021-07-26 Thread Benjamin Marzinski
On Thu, Jul 15, 2021 at 12:52:15PM +0200, mwi...@suse.com wrote: > From: Martin Wilck > > We've seen a crash of multipath in disassemble_map because of a params > string exceeding PARAMS_SIZE. While the crash could have been fixed by > a simple error check, I believe multipath should be able to w

Re: [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount

2021-07-26 Thread Benjamin Marzinski
On Mon, Jul 26, 2021 at 08:22:49PM +0800, lixiaokeng wrote: > > >> After sdb mounted to /var, we can start multipathd service successfully. > > > > But when the binaries were compiled, if /var/run existed and was a > > symlink in your build environment, then RUN should equal "run", and > > multip

Re: [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount

2021-07-23 Thread Benjamin Marzinski
On Fri, Jul 23, 2021 at 02:27:58PM +0800, lixiaokeng wrote: > > > On 2021/7/23 5:42, Benjamin Marzinski wrote: > > On Thu, Jul 22, 2021 at 10:51:22AM +0800, lixiaokeng wrote: > >> When we enable multipathd.service with systemctl and reboot, > >> multipathd doesn&

Re: [dm-devel] [Question] multipathd.service start failed when /var/run isn't mount

2021-07-22 Thread Benjamin Marzinski
On Thu, Jul 22, 2021 at 10:51:22AM +0800, lixiaokeng wrote: > When we enable multipathd.service with systemctl and reboot, > multipathd doesn't start and log "failed to create pidfile". > > The reason is following: > > The RUN is /var/run in multipath-tools. When we start linux, we > mount a disk

Re: [dm-devel] [PATCH] libmultipath: use uint64_t for sg_id.lun

2021-07-02 Thread Benjamin Marzinski
> Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 10 +- > libmultipath/print.c | 2 +- > libmultipath/prioritizers/weightedpath.c | 2 +- > libmultipath/structs.c

Re: [dm-devel] [PATCH] multipath-tools: Remove trailing/leading whitespaces

2021-05-24 Thread Benjamin Marzinski
On Sat, May 22, 2021 at 09:17:36PM +0200, Xose Vazquez Perez wrote: > Cc: Martin Wilck > Cc: Benjamin Marzinski > Cc: Christophe Varoqui > Cc: DM-DEVEL ML > Signed-off-by: Xose Vazquez Perez If no one objects, I'm fine with this going in. But if anyone has objections

Re: [dm-devel] [PATCH] libmultipath: fix build without LIBDM_API_DEFERRED

2021-05-24 Thread Benjamin Marzinski
ted-by: Paul Menzel Reviewed-by: Benjamin Marzinski > --- > libmultipath/devmapper.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c > index 095cbc0..47a6d60 100644 > --- a/libmult

Re: [dm-devel] [PATCH v2 4/4] libdmmp: use KBUILD_BUILD_TIMESTAMP when building man pages

2021-05-20 Thread Benjamin Marzinski
f-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > libdmmp/Makefile | 2 ++ > libdmmp/docs/man/dmmp_context_free.3 | 2 +- > libdmmp/docs/man/dmmp_context_log_func_set.3 | 2 +- > libdmmp/docs/man/dmmp_context

<    1   2   3   4   5   6   7   8   9   10   >