[dm-devel] [PATCH 2/9] libmultipath: handle existing paths in marginal_path enqueue

2019-02-22 Thread Benjamin Marzinski
If the path that enqueue_io_err_stat_by_path() is trying to add is already on the list, just return success. There's no reason to fail in this case. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 6 ++ 1 file changed, 2 insertions(+), 4

[dm-devel] [PATCH 0/9] Misc Multipath patches

2019-02-22 Thread Benjamin Marzinski
The series is a mix of resends an new patches. Patches 0001-0005 are simply resends of patches I've submitted earlier, with no changes other that adding Reviewed-by's where appropriate. Patches 0006-0009 are the result of running into some bugs during firmare updates on an array. Benjamin

[dm-devel] [PATCH 4/9] libmultipath: fix marginal paths queueing errors

2019-02-22 Thread Benjamin Marzinski
PATH_IO_ERR_IN_POLLING_RECHECK and the function hit_io_err_recheck_time() now apply to paths waiting to be enqueued for the first time as well, I've also changed their names to PATH_IO_ERR_WAITING_TO_CHECK and need_io_err_check(), respectively. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH v2 2/4] multipath: blacklist zram devices

2019-02-13 Thread Benjamin Marzinski
Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/blacklist.c | 2 +- multipath/multipath.conf.5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c index 709895e..e0d0279 100644

[dm-devel] [PATCH v2 3/4] multipathd: fix pp->initialized state ping-ponging

2019-02-13 Thread Benjamin Marzinski
ces start in this state, instead of INIT_FAILED. INIT_NEW and INIT_FAILED are treated exactly the same, with one exception. A device in INIT_FAILED cannot transition back to INIT_MISSING_UDEV. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c

[dm-devel] [PATCH v2 4/4] multipathd: don't resend change events for unknown devices

2019-02-13 Thread Benjamin Marzinski
If multipath fails to get the wwid for a device, and the device is of an unknown type (pp->bus == SYSFS_BUS_UNDEF), don't send change events. Instead, assume that the device was not meant to be used and skip it. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultip

[dm-devel] [PATCH v2 1/4] multipathd: avoid null pointer dereference in LOG_MSG

2019-02-13 Thread Benjamin Marzinski
sable path" case) Signed-off-by: Benjamin Marzinski Signed-off-by: Martin Wilck --- libmultipath/checkers.c | 9 + libmultipath/checkers.h | 6 +- multipathd/main.c | 6 -- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/libmultipath/chec

[dm-devel] [PATCH v2 0/4] multipath: fixes for invalid path device handling

2019-02-13 Thread Benjamin Marzinski
types that we do support? Changes in v2: use Martin Wilck's version of PATCH 1/4 Benjamin Marzinski (3): multipath: blacklist zram devices multipathd: fix pp->initialized state ping-ponging multipathd: don't resend change events for unknown devices Martin Wilck (1): multipathd: avoid n

Re: [dm-devel] [PATCH 1/4] multipathd: avoid null pointer dereference in LOG_MSG\

2019-02-08 Thread Benjamin Marzinski
On Fri, Feb 08, 2019 at 10:05:51AM +0100, Martin Wilck wrote: > On Thu, 2019-02-07 at 17:52 -0600, Benjamin Marzinski wrote: > > LOG_MSG() will dereference pp->mpp. Commit cb5ec664 added a call to > > LOG_MSG() before the check for (!pp->mpp) in check_path. This can >

[dm-devel] [PATCH 0/4] multipath: fixes for invalid path device handling

2019-02-07 Thread Benjamin Marzinski
types that we do support? Benjamin Marzinski (4): multipathd: avoid null pointer dereference in LOG_MSG multipath: blacklist zram devices multipathd: fix pp->initialized state ping-ponging multipathd: don't resend change events for unknown devices libmultipath/blacklist.c |

[dm-devel] [PATCH 1/4] multipathd: avoid null pointer dereference in LOG_MSG

2019-02-07 Thread Benjamin Marzinski
c message if c->cls isn't set (which means that a checker hasn't been selected). Fixes: cb5ec664 (multipathd: check_path: improve logging for "unusable path" case) Cc: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/checkers.c | 2 +- multipathd/main

[dm-devel] [PATCH 3/4] multipathd: fix pp->initialized state ping-ponging

2019-02-07 Thread Benjamin Marzinski
ces start in this state, instead of INIT_FAILED. INIT_NEW and INIT_FAILED are treated exactly the same, with one exception. A device in INIT_FAILED cannot transition back to INIT_MISSING_UDEV. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 8 +--- libmultipath/structs.h

[dm-devel] [PATCH 4/4] multipathd: don't resend change events for unknown devices

2019-02-07 Thread Benjamin Marzinski
If multipath fails to get the wwid for a device, and the device is of an unknown type (pp->bus == SYSFS_BUS_UNDEF), don't send change events. Instead, assume that the device was not meant to be used and skip it. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 2 ++ 1 f

[dm-devel] [PATCH 2/4] multipath: blacklist zram devices

2019-02-07 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- libmultipath/blacklist.c | 2 +- multipath/multipath.conf.5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c index 709895e..e0d0279 100644 --- a/libmultipath/blacklist.c +++ b

[dm-devel] [PATCH 4/4] libmultipath: fix marginal_paths nr_active check

2019-01-30 Thread Benjamin Marzinski
Marginal paths are SHAKY, so they don't count towards the number of active paths. poll_io_err_stat() shouldn't automatically reinstate a marginal path if there already is an active path. Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file changed, 1 insertion(+), 1

[dm-devel] [PATCH 2/4] multipathd: cleanup marginal paths checking timers

2019-01-30 Thread Benjamin Marzinski
get recovered, or it will succeed, and we won't check the reinstate time again until poll_io_err_stat() marks the path as needing a requeue. Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed, 2 insertions(+), 9 deleti

[dm-devel] [PATCH 3/4] libmultipath: fix marginal paths queueing errors

2019-01-30 Thread Benjamin Marzinski
PATH_IO_ERR_IN_POLLING_RECHECK and the function hit_io_err_recheck_time() now apply to paths waiting to be enqueued for the first time as well, I've also changed their names to PATH_IO_ERR_WAITING_TO_CHECK and need_io_err_check(), respectively. Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 55

[dm-devel] [PATCH 0/4] Marginal Path Fixes and cleanups

2019-01-30 Thread Benjamin Marzinski
fail because the path is down. Instead, it should wait for the path to come back up before it queues it, and starts the IO error checking. This is fixed in patch 0003. The other patches are mostly cleanups. The issues they fix aren't actually breaking things. Benjamin Marzinski (4

[dm-devel] [PATCH 1/4] libmultipath: handle existing paths in marginal_path enqueue

2019-01-30 Thread Benjamin Marzinski
If the path that enqueue_io_err_stat_by_path() is trying to add is already on the list, just return success. There's no reason to fail in this case. Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[dm-devel] [PATCH] libmultipath: disable user_friendly_names for NetApp

2019-01-30 Thread Benjamin Marzinski
config. Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index d3a8d9b..8776411 100644 --- a/libmultipath/hwtable.c +++ b/libmultipath/hwtable.c @@ -719,6 +719,7 @@ static struct

Re: [dm-devel] [PATCH 08/12] libmultipath(coverity): fix "enum misuse" for find_multipaths

2019-01-17 Thread Benjamin Marzinski
On Thu, Jan 17, 2019 at 10:25:03PM +0100, Martin Wilck wrote: > On Thu, 2019-01-17 at 13:55 -0600, Benjamin Marzinski wrote: > > On Tue, Jan 08, 2019 at 11:54:05PM +0100, Martin Wilck wrote: > > > Signed-off-by: Martin Wilck > > > --- > > > libmultipath/di

Re: [dm-devel] [PATCH] multipathd: avoid crash in cli_list_path

2019-01-17 Thread Benjamin Marzinski
On Wed, Jan 09, 2019 at 12:25:43AM +0100, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > multipathd can be crashed by passing an invalid path name > to the "show path" command. Fix it. > --- > multipathd/cli_handlers.c | 2 ++ > 1 file changed, 2 inse

Re: [dm-devel] [PATCH 00/12] multipath-tools: Coverity patches

2019-01-17 Thread Benjamin Marzinski
On Tue, Jan 08, 2019 at 11:53:57PM +0100, Martin Wilck wrote: Aside from my question on 08/12, ACK for the set -Ben > Hi Christophe, > > here are a few simple fixes motivated by a recent > coverity scan of the latest upstream. Most are false positives, > but it can't hurt to fix them anyway,

Re: [dm-devel] [PATCH 08/12] libmultipath(coverity): fix "enum misuse" for find_multipaths

2019-01-17 Thread Benjamin Marzinski
On Tue, Jan 08, 2019 at 11:54:05PM +0100, Martin Wilck wrote: > Signed-off-by: Martin Wilck > --- > libmultipath/dict.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libmultipath/dict.c b/libmultipath/dict.c > index fd29abc..eaad4f1 100644 > --- a/libmultipath/dict.c

Re: [dm-devel] [PATCH 0/3] multipath-tools: compilation fixes

2019-01-16 Thread Benjamin Marzinski
On Tue, Jan 08, 2019 at 12:32:43PM +0100, Martin Wilck wrote: > Hi Christophe, > > my late NVMe patch series broke compilatioin with older > kernel headers. This series fixes that, and adds two other > minor build-related fixes. > > Regards, > Martin ACK for the set -Ben > > Martin Wilck

Re: [dm-devel] [RFC PATCH 2/6] multipathd: protect all access to running_state

2019-01-16 Thread Benjamin Marzinski
MON_SHUTDOWN terminates all loops of this kind. Reviewed-by: Benjamin Marzinski > > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 79 --- > 1 file changed, 48 insertions(+), 31 deletions(-) > > diff --git a/multipathd/m

Re: [dm-devel] [RFC PATCH 1/6] multipathd: fix daemon not really shutdown

2019-01-16 Thread Benjamin Marzinski
from DAEMON_SHUTDOWN to other status > like DAEMON_IDLE, which will make the shutdown process stopped. > I found logs to prove this really happened, so we need add judgement > here too. > > (2) [this part removed by mwilck] > Reviewed-by: Benjamin Marzinski > Signed-off-by: Chongy

Re: [dm-devel] [RFC PATCH 6/6] multipathd: uxlsnr: handle signals while busy

2019-01-16 Thread Benjamin Marzinski
On Fri, Jan 04, 2019 at 06:59:14PM +0100, Martin Wilck wrote: > The uxlsnr thread is responsible for receiving and handling > signals in multipathd. This works well while it is idle and > waiting for connections in ppoll(). But if it's busy, cli commands > may need to take the vecs lock, which

Re: [dm-devel] [RFC PATCH 5/6] multipathd: add code to handle blocked signals

2019-01-16 Thread Benjamin Marzinski
On Fri, Jan 04, 2019 at 06:59:13PM +0100, Martin Wilck wrote: > multipathd blocks all signals except in the uxlsnr thread. > Add some code to handle signals even while they're blocked. > > If a shutdown signal is received, deliver_pending_signals() returns > TRUE. This is not the same as

Re: [dm-devel] [RFC PATCH 4/6] multipathd: cancel threads early during shutdown

2019-01-16 Thread Benjamin Marzinski
On Fri, Jan 04, 2019 at 06:59:12PM +0100, Martin Wilck wrote: > Cancel the other threads before taking vecs->lock. This avoids > delays during shutdown caused e.g. by the checker thread holding > the vecs lock. Before this change, multipathd was guaranteed that once a thread had locked the vecs

Re: [dm-devel] [RFC PATCH 3/6] multipathd: allow shutdown during configure()

2019-01-16 Thread Benjamin Marzinski
On Fri, Jan 04, 2019 at 06:59:11PM +0100, Martin Wilck wrote: > reconfigure() can be a long-running operation; both initial path > discovery and initial map setup can take a long time. Allow > the main program to indicate that the process should be > interrupted if a shutdown signal was received.

Re: [dm-devel] [RFC PATCH 1/1] dm: add dust target

2019-01-08 Thread Benjamin Marzinski
On Tue, Jan 08, 2019 at 10:30:32AM -0500, Bryan Gurney wrote: > On Mon, Jan 7, 2019 at 7:10 PM Benjamin Marzinski wrote: > > > > On Mon, Jan 07, 2019 at 02:31:23PM -0500, Bryan Gurney wrote: > > > + > > > +static int dust_add_block(struct dust_device *dd

Re: [dm-devel] [PATCH 00/19] san_path_err & multipath ANA support

2019-01-08 Thread Benjamin Marzinski
On Tue, Jan 08, 2019 at 09:50:33AM +0100, Martin Wilck wrote: > On Mon, 2019-01-07 at 13:15 -0600, Benjamin Marzinski wrote: > > On Mon, Jan 07, 2019 at 12:21:55PM +0100, Martin Wilck wrote: > > > On Fri, 2018-12-21 at 10:06 -0600, Benjamin Marzinski wrote: > > > > I

Re: [dm-devel] [RFC PATCH 1/1] dm: add dust target

2019-01-07 Thread Benjamin Marzinski
On Mon, Jan 07, 2019 at 02:31:23PM -0500, Bryan Gurney wrote: > Add the dm-dust target, which simulates the behavior of bad sectors > at arbitrary locations, and the ability to enable the emulation of > the read failures at an arbitrary time. > > This target behaves similarly to a linear target,

Re: [dm-devel] [PATCH 00/19] san_path_err & multipath ANA support

2019-01-07 Thread Benjamin Marzinski
On Mon, Jan 07, 2019 at 12:21:55PM +0100, Martin Wilck wrote: > On Fri, 2018-12-21 at 10:06 -0600, Benjamin Marzinski wrote: > > > > I've been thinking about how we handle marginal paths, and it seems > > to > > me that instead of telling the kernel that

Re: [dm-devel] [PATCH 00/19] san_path_err & multipath ANA support

2018-12-21 Thread Benjamin Marzinski
On Wed, Dec 19, 2018 at 12:19:12AM +0100, Martin Wilck wrote: > Hi Christophe, > > this series consists of 3 parts. The first part improves the documentation on > the current approaches to "shaky" or "marginal" path detection, and > re-introduces the previously removed "san_path_err_xy" approach,

Re: [dm-devel] [PATCH 00/19] san_path_err & multipath ANA support

2018-12-20 Thread Benjamin Marzinski
On Wed, Dec 19, 2018 at 12:19:12AM +0100, Martin Wilck wrote: > Hi Christophe, > > this series consists of 3 parts. The first part improves the documentation on > the current approaches to "shaky" or "marginal" path detection, and > re-introduces the previously removed "san_path_err_xy" approach,

Re: [dm-devel] [PATCH 15/19] libmultipath: ANA prioritzer: use nvme wrapper library

2018-12-20 Thread Benjamin Marzinski
On Wed, Dec 19, 2018 at 12:19:27AM +0100, Martin Wilck wrote: > Use the previously introduced NVME wrapper library for > the passthrough commands from the ANA prioritizer. Discard > code duplicated from nvme-cli from the ana code itself. > > Furthermore, make additional cleanups in the ANA

Re: [dm-devel] [PATCH 0/1] update to v2 Fix false removes

2018-12-11 Thread Benjamin Marzinski
On Tue, Dec 11, 2018 at 03:23:03PM -0600, Benjamin Marzinski wrote: > I accidentally didn't include Christophe in my > > [PATCH v2 0/1] Fix false removes Clearly, something is wrong with my git send-mail setup, since you got ignored again. Sorry. I'll figure out what's going

[dm-devel] [PATCH 1/1] libmultipath: dm_is_mpath cleanup

2018-12-11 Thread Benjamin Marzinski
Add condlog() message in dm_is_mpath() fails and change the dm_is_mpath() call in watch_dmevents() to check the return value with the same syntax as all the other callers. Fixes: 9050cd5a "libmultipath: fix false removes in dmevents polling code" Reviewed-by: Martin Wilck Signed-off-by

[dm-devel] [PATCH 0/1] update to v2 Fix false removes

2018-12-11 Thread Benjamin Marzinski
as the end result is the same as what he reviewed, and no intervening commits have touched libmultipath/devmapper.c or multipathd/dmevents.c Benjamin Marzinski (1): libmultipath: dm_is_mpath cleanup libmultipath/devmapper.c | 21 - multipathd/dmevents.c| 4 +++- 2 files c

Re: [dm-devel] [PATCH v2 23/24] domap(): never return DOMAP_RETRY in daemon mode

2018-12-11 Thread Benjamin Marzinski
On Sun, Dec 09, 2018 at 10:06:05PM +0100, Martin Wilck wrote: > On Mon, 2018-12-03 at 17:45 -0600, Benjamin Marzinski wrote: > > TL;DR: I'm 99.7% sure we don't need lock_multipath() any more. > > The historic reason is 4d7a270: > > 'Multiple multipath(8) execs can

Re: [dm-devel] [PATCH 08/19] libmultipath: decrease log level of word splitting

2018-12-03 Thread Benjamin Marzinski
On Wed, Nov 21, 2018 at 11:18:28AM +0100, Martin Wilck wrote: > This will make log level 4 actually usable. in light of [PATCH v2 20/24] libmultipath: avoid syslog loglevel > LOG_DEBUG Reviewed-by: Benjamin Marzinski > > Signed-off-by: Martin Wilck > --- > libmultipath/

Re: [dm-devel] [PATCH v2 00/24] multipath-tools: improve logging at -v3

2018-12-03 Thread Benjamin Marzinski
On Mon, Dec 03, 2018 at 08:36:18PM +0100, Martin Wilck wrote: > Hi Christophe, > > most of the patches in this series reduce log levels of frequently > printed messages at verbosity level 3. My goal was to limit the > output of multipathd to one line per path per checker invocation, > which is

Re: [dm-devel] [PATCH v2 24/24] multipath: use symbolic return value and exit code

2018-12-03 Thread Benjamin Marzinski
On Mon, Dec 03, 2018 at 08:36:24PM +0100, Martin Wilck wrote: > Use an enum to represent the return code and exit status of > multipath and its most important subroutine, configure(). > This clarifies the confusing use of booleans and status > codes a bit, hopefully. Thanks for this.

Re: [dm-devel] [PATCH v2 23/24] domap(): never return DOMAP_RETRY in daemon mode

2018-12-03 Thread Benjamin Marzinski
On Mon, Dec 03, 2018 at 08:36:23PM +0100, Martin Wilck wrote: > DOMAP_RETRY is only used by the multipath tool. multipathd always treats > it exactly like DOMAP_FAIL. Simplify logic by only returning > DOMAP_RETRY in non-daemon mode from domap(). > > Signed-off-by: Martin Wilck > --- >

[dm-devel] [PATCH v2 1/1] libmultipath: fix false removes in dmevents polling code

2018-11-29 Thread Benjamin Marzinski
the device list, to see if the device should be monitored. This commit makes dm_is_mpath() return -1 for situations where the libdevmapper command failed, and makes dm_get_events() only ignore the device on a return of 0. Signed-off-by: Benjamin Marzinski --- libmpathpersist/mpath_persist.c | 4

[dm-devel] [PATCH v2 0/1] Fix false removes

2018-11-29 Thread Benjamin Marzinski
This is a resend of my previous patch 2/2, incorporating both of Martin's suggestions. Benjamin Marzinski (1): libmultipath: fix false removes in dmevents polling code libmpathpersist/mpath_persist.c | 4 ++-- libmultipath/devmapper.c| 41

Re: [dm-devel] [PATCH 00/19] multipath-tools: improve logging at -v3

2018-11-29 Thread Benjamin Marzinski
On Wed, Nov 21, 2018 at 11:18:20AM +0100, Martin Wilck wrote: > Hi Christophe, > > most of the patches in this series reduce log levels of frequently > printed messages at verbosity level 3. My goal was to limit the > output of multipathd to one line per path per checker invocation, > which is

Re: [dm-devel] [PATCH 16/19] libmultipath: coalesce_paths: fix size mismatch handling

2018-11-29 Thread Benjamin Marzinski
On Wed, Nov 21, 2018 at 11:18:36AM +0100, Martin Wilck wrote: > When there are paths with the same WWID but different sizes, and > coalesce_paths() walks the pathvec, it checks paths _after_ > the current one for size mismatch and sets ACT_REJECT. However, > these paths will be reached in the main

Re: [dm-devel] [PATCH 08/19] libmultipath: decrease log level of word splitting

2018-11-29 Thread Benjamin Marzinski
On Wed, Nov 21, 2018 at 11:18:28AM +0100, Martin Wilck wrote: > This will make log level 4 actually usable. condlog doesn't actually handle verbosity levels gerater than 4 correctly when logging to syslog (there is no loglevel 8). I didn't even realize that there were any condlog(5, ...) calls.

Re: [dm-devel] Disconcerting observation with multipathd's dmevent polling code

2018-11-28 Thread Benjamin Marzinski
On Wed, Nov 28, 2018 at 10:31:02AM +0100, Martin Wilck wrote: > On Tue, 2018-11-27 at 14:13 -0600, Benjamin Marzinski wrote: > > On Tue, Nov 27, 2018 at 10:19:20AM +0100, Martin Wilck wrote: > > > > > > I like this idea, in particular for map removal. &

[dm-devel] [PATCH 2/2] libmultipath: fix false removes in dmevents polling code

2018-11-27 Thread Benjamin Marzinski
the device list, to see if the device should be monitored. This commit makes dm_is_mpath() return -1 for situations where the libdevmapper command failed, and makes dm_get_events() only ignore the device on a return of 0. Signed-off-by: Benjamin Marzinski --- libmpathpersist/mpath_persist.c | 4

[dm-devel] [PATCH 1/2] libmultipath: cleanup pthread_cleanup_pop call

2018-11-27 Thread Benjamin Marzinski
if block, it doesn't actually cause any problems, but it should be fixed anyways. Signed-off-by: Benjamin Marzinski --- libmultipath/uevent.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c index 5f910e6..f73de8c 100644

Re: [dm-devel] Disconcerting observation with multipathd's dmevent polling code

2018-11-27 Thread Benjamin Marzinski
On Tue, Nov 27, 2018 at 10:19:20AM +0100, Martin Wilck wrote: > Hi Ben, > > On Wed, 2018-11-21 at 12:20 +0100, Hannes Reinecke wrote: > > On 11/21/18 11:50 AM, Martin Wilck wrote: > > > Hi Ben, > > > > > > I recently encountered a strange and disturbing phenomenon with the > > > latest upstream

[dm-devel] [PATCH] multipathd: fix mpp->hwe handling when paths are freed

2018-11-20 Thread Benjamin Marzinski
the code, I've moved the size check to before the rescan label so it only happens once. Fixes: 1f962693 "multipathd: fix mpp->hwe handling on path removal" Cc: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/structs_vec.c | 7 +++ multipath

Re: [dm-devel] [PATCH v3 4/7] multipathd: open client socket early

2018-11-02 Thread Benjamin Marzinski
On Fri, Nov 02, 2018 at 01:23:59PM +0100, Martin Wilck wrote: > Open the unix socket in multipathd code and pass the fd to > uxsock_listen(). This will enable us to make the main thread > wait for successful socket initialization in a follow-up patch. > Reviewed-by: Benjam

Re: [dm-devel] [PATCH v5 03/21] libmultipath/checkers: replace message by msgid

2018-11-02 Thread Benjamin Marzinski
Follow-up patches implement this for the existing checkers. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers.c | 61 +--- > libmultipath/checkers.h | 43 > libmultipath/d

Re: [dm-devel] [PATCH v3 13/22] libmultipath: clariion checker: leave unsupported paths alone

2018-11-02 Thread Benjamin Marzinski
On Tue, Oct 30, 2018 at 10:06:44PM +0100, Martin Wilck wrote: > A checker shouldn't set the path state to PATH_DOWN if it fails > to obtain information about the path in the first place. Add logic > to the checker to distinguish a failed path from an unsupported path. > Reviewed-

Re: [dm-devel] [PATCH v2 4/7] multipathd: open client socket early

2018-11-01 Thread Benjamin Marzinski
On Tue, Oct 30, 2018 at 10:22:46PM +0100, Martin Wilck wrote: > Open the unix socket in multipathd code and pass the fd to > uxsock_listen(). This will enable us to make the main thread > wait for successful socket initialization in a follow-up patch. > > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH v3 22/22] libmultipath: make checker_message thread safe

2018-11-01 Thread Benjamin Marzinski
On Tue, Oct 30, 2018 at 10:06:53PM +0100, Martin Wilck wrote: > Get rid of the static char buffer in checker_message() > introduced in the previous "replace message by msgid" patch. What you have is fine, but why not something like this, which doesn't need to do any allocating? diff --git

Re: [dm-devel] [PATCH v4 03/22] libmultipath/checkers: replace message by msgid

2018-11-01 Thread Benjamin Marzinski
-up patches implement this for the existing checkers. > checker_message() isn't thread-safe in its current form. > This will be fixed in another follow-up patch. Reviewed-by: Benjamin Marzinski > --- > libmultipath/checkers.c | 70 +++-- >

Re: [dm-devel] [PATCH 7/7] multipathd: only grab conf once for filter_path()

2018-10-26 Thread Benjamin Marzinski
On Wed, Oct 24, 2018 at 12:05:52AM +0200, Martin Wilck wrote: > This saves a possibly large number of cleanup push/pop calls and > slightly improves readability. > Reviewed-by: Benjamin Marzinsk > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 7 --- > 1 file changed, 4

Re: [dm-devel] [PATCH 6/7] multipathd: make DAEMON_SHUTDOWN a terminal state

2018-10-26 Thread Benjamin Marzinski
On Wed, Oct 24, 2018 at 12:05:51AM +0200, Martin Wilck wrote: > It can happen that, before the main thread reacts on DAEMON_SHUTDOWN > and starts cancelling threads, another thread resets the state to > something else. Fix that. > Reviewed-by: Benjamin Marzinsk > Signed-off-by: Martin Wilck >

Re: [dm-devel] [PATCH 5/7] multipathd: set DAEMON_CONFIGURE from uxlsnr thread

2018-10-26 Thread Benjamin Marzinski
On Wed, Oct 24, 2018 at 12:05:50AM +0200, Martin Wilck wrote: > Commit ee01e841 had the intention to make multipathd quit if > the client socket couldn't be set up, because the unix socket > listener is vital for signal handling in multipathd. > But during startup, this condition might be lost if

Re: [dm-devel] [PATCH 4/7] multipathd: open client socket early

2018-10-26 Thread Benjamin Marzinski
On Wed, Oct 24, 2018 at 12:05:49AM +0200, Martin Wilck wrote: > Open the unix socket in multipathd code and pass the fd to > uxsock_listen(). This will enable us to make the main thread > wait for successful socket initialization in a follow-up patch. > > Signed-off-by: Martin Wilck > --- >

Re: [dm-devel] [PATCH 3/7] multipathd: print error message if checkint is not initialized

2018-10-26 Thread Benjamin Marzinski
On Wed, Oct 24, 2018 at 12:05:48AM +0200, Martin Wilck wrote: > This is just a safety measure in case I overlooked something wrt > the checkint initialization. It could be reverted once we know the > error message isn't triggered. > Reviewed-by: Benjamin Marzinsk > Signed-off-by: Martin Wilck

Re: [dm-devel] [PATCH 1/7] libmultipath: set pp->checkint in store_pathinfo()

2018-10-26 Thread Benjamin Marzinski
On Wed, Oct 24, 2018 at 12:05:46AM +0200, Martin Wilck wrote: > store_pathinfo is called with valid conf pointer anyway, so > checkint is available. pp->checkint is now valid for every > path after path_discovery(). > > This fixes a bad conf access in cli_add_path(). > Reviewed-by: Benjamin

Re: [dm-devel] [PATCH 17/21] libmultipath: pathinfo: don't blank wwid if checker fails

2018-10-26 Thread Benjamin Marzinski
On Fri, Oct 26, 2018 at 11:16:23AM +0200, Martin Wilck wrote: > On Thu, 2018-10-25 at 16:50 -0500, Benjamin Marzinski wrote: > > On Fri, Oct 12, 2018 at 12:27:03AM +0200, Martin Wilck wrote: > > > Blanking a WWID is a dangerous operation. E.g. configure() would >

Re: [dm-devel] [PATCH 13/21] libmultipath: clariion checker: leave unsupported paths alone

2018-10-26 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:59AM +0200, Martin Wilck wrote: > A checker shouldn't set the path state to PATH_DOWN if it fails > to obtain information about the path in the first place. Add logic > to the checker to distinguish a failed path from an unsupported path. > > Signed-off-by: Martin

Re: [dm-devel] [PATCH 19/21] libmultipath: coalesce_paths: improve logging of orphaned paths

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:05AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/configure.c | 10 +++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/libmultipath/configure.c b/libmul

Re: [dm-devel] [PATCH 21/21] libmultipath/checkers: cleanup class/instance model

2018-10-25 Thread Benjamin Marzinski
etc) on the way. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers.c | 137 --- > libmultipath/checkers.h | 23 ++ > libmultipath/checkers/directio.c | 2 +- > libmultipath/ch

Re: [dm-devel] [PATCH 18/21] multipathd: check_path: improve logging for "unusable path" case

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:04AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/multipathd/main.c b/multipathd/main.c > ind

Re: [dm-devel] [PATCH 20/21] libmultipath: sync_map_state: log failing paths

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:06AM +0200, Martin Wilck wrote: > Emit a log message when force-failing exisiting paths. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/structs_vec.c | 5 - > 1 file changed, 4 insertions(+), 1 del

Re: [dm-devel] [PATCH 17/21] libmultipath: pathinfo: don't blank wwid if checker fails

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:03AM +0200, Martin Wilck wrote: > Blanking a WWID is a dangerous operation. E.g. configure() would > consider the path in question as invalid and orphan it if the > WWID is blank. Don't do this for possibly transient checker failures. > Moreover, we try to determine

Re: [dm-devel] [PATCH 14/21] libmultipath: hp_sw checker: leave unsupported paths alone

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:00AM +0200, Martin Wilck wrote: > A checker shouldn't set the path state to PATH_DOWN if it fails > to obtain information about the path in the first place. Add logic > to the checker to distinguish a failed path from an unsupported path. > Reviewed-

Re: [dm-devel] [PATCH 12/21] libmultipath/checkers: support unsupported paths

2018-10-25 Thread Benjamin Marzinski
rong checker). > Use PATH_WILD for the latter case, as it's hardly used now. > > Provide a generic message for the situation that a path > checker can't handle a certain path. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers.c

Re: [dm-devel] [PATCH 16/21] libmultipath: tur checker: leave unsupported paths alone

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:02AM +0200, Martin Wilck wrote: > A checker shouldn't set the path state to PATH_DOWN if it fails > to obtain information about the path in the first place. Add logic > to the checker to distinguish a failed path from an unsupported path. > Reviewed-

Re: [dm-devel] [PATCH 15/21] libmultipath: rdac checker: leave unsupported paths alone

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:27:01AM +0200, Martin Wilck wrote: > A checker shouldn't set the path state to PATH_DOWN if it fails > to obtain information about the path in the first place. Add logic > to the checker to distinguish a failed path from an unsupported path. > Reviewed-

Re: [dm-devel] [PATCH 10/21] libmultipath/checkers: tur: use message id

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:56AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/tur.c | 54 - > 1 file changed, 30 insertions(+), 24 deletions(-) > > diff --

Re: [dm-devel] [PATCH 11/21] multipathd: improve checker message logging

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:57AM +0200, Martin Wilck wrote: > Don't rely on any variables being defined in LOG_MSG. > If message log level is low, don't bother to fetch the message. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > mult

Re: [dm-devel] [PATCH 09/21] libmultipath/checkers: readsector0: use message id

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:55AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/readsector0.c | 7 ++- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/libmultipath/checkers/

Re: [dm-devel] [PATCH 08/21] libmultipath/checkers: rdac: use message id

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:54AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/rdac.c | 64 +--- > 1 file changed, 45 insertions(+), 19 deletions(-) > > diff --

Re: [dm-devel] [PATCH 06/21] libmultipath/checkers: emc_clariion: use message id

2018-10-25 Thread Benjamin Marzinski
ply report "read error" as checker message. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/emc_clariion.c | 60 +++- > 1 file changed, 42 insertions(+), 18 deletions(-) > > diff --git a/libmultipa

Re: [dm-devel] [PATCH 07/21] libmultipath/checkers: hp_sw: use message id

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:53AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/hp_sw.c | 12 > 1 file changed, 4 insertions(+), 8 deletions(-) > > diff --git a/libmultipath/checkers/hp_s

Re: [dm-devel] [PATCH 03/21] libmultipath/checkers: replace message by msgid

2018-10-25 Thread Benjamin Marzinski
ollow-up patches implement this for the existing checkers. I have some cosmetic nits that I'll add inline, but none of them are real problems so, Reviewed-by: Benjamin Marzinski > > Signed-off-by: Martin Wilck > --- > libmultipath/checkers.c | 70 +++--

Re: [dm-devel] [PATCH 04/21] libmultipath/checkers: cciss_tur: use message id

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:50AM +0200, Martin Wilck wrote: Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/cciss_tur.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/libmultipath/checker

Re: [dm-devel] [PATCH 02/21] libmultipath: fix memory leaks from scandir() use

2018-10-25 Thread Benjamin Marzinski
nction pointers to the > type pthread_cleanup_push() expects. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/config.c | 10 -- > libmultipath/foreign.c | 5 - > libmultipath/foreign/nvme.c | 6 +-

Re: [dm-devel] [PATCH 01/21] libmultipath: fix use of uninitialized memory in write()

2018-10-25 Thread Benjamin Marzinski
On Fri, Oct 12, 2018 at 12:26:47AM +0200, Martin Wilck wrote: > valgrind complained about this. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > d

Re: [dm-devel] [PATCH v2 07/10] libmultipath: handle TUR threads that can't be cancelled

2018-10-23 Thread Benjamin Marzinski
On Tue, Oct 23, 2018 at 10:49:49PM +0200, Martin Wilck wrote: > On Tue, 2018-10-23 at 14:28 -0500, Benjamin Marzinski wrote: > > > On Tue, Oct 23, 2018 at 03:43:45PM +0200, Martin Wilck wrote: > > > When the tur checker code determines that a hanging TUR thread > &

Re: [dm-devel] [PATCH v2 10/10] multipath.8: fix description of "device" argument

2018-10-23 Thread Benjamin Marzinski
On Tue, Oct 23, 2018 at 03:43:48PM +0200, Martin Wilck wrote: > Describe the fact that we can refer to path devices by WWID, and > to multipath maps by devnode. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > multipat

Re: [dm-devel] [PATCH v2 09/10] multipathd: improve "add missing path" handling

2018-10-23 Thread Benjamin Marzinski
he check for pp->initialized != INIT_MISSING_UDEV is redundant, > as check_path() returns early in all other cases. Replace it by a > check for INIT_FAILED, in case we ever add more init states. > Thanks Reviewed-by: Benjamin Marzinski > Suggested-by: Benjamin Marzinski

Re: [dm-devel] [PATCH v2 08/10] multipathd: handle repeated udev retrigger failure

2018-10-23 Thread Benjamin Marzinski
info(DI_ALL) will be called from check_path(), and there's at least > some chance to obtain a WWID for it. > > Signed-off-by: Martin Wilck Reviewed-by: Benjamin Marzinski > --- > multipathd/main.c | 32 +++- > 1 file changed, 23 insertions(+), 9 delet

Re: [dm-devel] [PATCH v2 07/10] libmultipath: handle TUR threads that can't be cancelled

2018-10-23 Thread Benjamin Marzinski
On Tue, Oct 23, 2018 at 03:43:45PM +0200, Martin Wilck wrote: > When the tur checker code determines that a hanging TUR thread > couldn't be cancelled, rather than simply returning, reallocate > the checker context and start a new thread. This will leak some > memory if the hanging thread never

Re: [dm-devel] [PATCH 8/8] multipathd: handle repeated udev retrigger failure

2018-10-12 Thread Benjamin Marzinski
On Wed, Oct 10, 2018 at 10:05:06PM +0200, Martin Wilck wrote: > If a path was still not properly initialized after exhausting the > retrigger tries, it used to remain in INIT_MISSING_UDEV state forever. > get_uid() might fall back to non-udev-based methods to determine > the WWID, but it would

Re: [dm-devel] [PATCH 7/8] libmultipath: handle TUR threads that can't be cancelled

2018-10-12 Thread Benjamin Marzinski
On Wed, Oct 10, 2018 at 10:05:05PM +0200, Martin Wilck wrote: > When the tur checker code determines that a hanging TUR thread > couldn't be cancelled, rather than simply returning, reallocate > the checker context and start a new thread. This will leak some > memory if the hanging thread never

Re: [dm-devel] [PATCH 6/8] libmultipath: test code for "zombie" TUR threads

2018-10-12 Thread Benjamin Marzinski
ut that flag, the patch has no effect. > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/checkers/tur.c | 45 + > 1 file changed, 45 insertions(+) > > diff --git a/libmultipath/checkers/tur.c b/li

Re: [dm-devel] [PATCH 5/8] multipath.8: man page update

2018-10-12 Thread Benjamin Marzinski
On Wed, Oct 10, 2018 at 10:05:03PM +0200, Martin Wilck wrote: > Clean up the synopsis, listing only combinations of command line switches > that work and make sense. Split the switches between "operation modes" > and options. Fix the documentation of the -v switch, which was wrong. > Move the

Re: [dm-devel] [PATCH 4/8] multipath.rules: add comment about DM_MULTIPATH_DEVICE_PATH=2

2018-10-12 Thread Benjamin Marzinski
On Wed, Oct 10, 2018 at 10:05:02PM +0200, Martin Wilck wrote: > See dm-devel discussion "Changes in DM_MULTIPATH_DEVICE_PATH in > multipath-tools 0.7.7" (Sep. 2018) for rationale. > Reviewed-by: Benjamin Marzinski > Cc: Adam Williamson > Signed-off-by: Martin

Re: [dm-devel] [PATCH 3/8] libmultipath: cciss_ioctl_pathinfo doesn't fail

2018-10-12 Thread Benjamin Marzinski
On Wed, Oct 10, 2018 at 10:05:01PM +0200, Martin Wilck wrote: > Make it a void function and move the DI_SERIAL test to pathinfo(). > Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 16 ++-- > 1 file changed, 6

<    9   10   11   12   13   14   15   16   17   18   >