Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-25 Thread Benjamin Marzinski
On Tue, Mar 19, 2019 at 07:44:09PM +0100, Martin Wilck wrote: > On Tue, 2019-03-19 at 12:11 -0500, Benjamin Marzinski wrote: > > On Mon, Mar 18, 2019 at 01:12:32PM +0100, Martin Wilck wrote: > > > > d) and e) seem to me like by far the most likely scenarios, so doing >

[dm-devel] [PATCH] Fix systemd version detection

2019-04-04 Thread Benjamin Marzinski
From: Igor Gnatenko Reviewed-by: Benjamin Marzinski Signed-off-by: Igor Gnatenko --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index fc728ca..5b2f6d4 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -37,7 +37,7 @@ endif

Re: [dm-devel] [PATCH] Fix systemd version detection

2019-04-04 Thread Benjamin Marzinski
On Fri, Apr 05, 2019 at 12:06:49AM +0200, Martin Wilck wrote: > Hi Ben, > > On Thu, 2019-04-04 at 17:03 -0500, Benjamin Marzinski wrote: > > From: Igor Gnatenko > > > > Reviewed-by: Benjamin Marzinski > > Signed-off-by: Igor Gnatenko > > I'd

[dm-devel] [PATCH v3 11/17] libmultipath: add get_uid fallback code for NVMe devices

2019-03-30 Thread Benjamin Marzinski
If multipath can't get the uid for NVMe devices from udev, it can get it directly from sysfs. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 49 1 file changed, 34 insertions(+), 15 deletions(-) diff --git

[dm-devel] [PATCH v3 14/17] multipathd: remove "wwid_changed" path attribute

2019-03-30 Thread Benjamin Marzinski
From: Martin Wilck This is now not needed any more. Signed-off-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/structs.h | 1 - multipathd/main.c | 6 -- 2 files changed, 7 deletions(-) diff --git a/libmultipath/structs.h b/libmultipath/structs.h index b794b0d

[dm-devel] [PATCH v3 10/17] multipath.conf: add missing options to man page

2019-03-30 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 10 ++ 1 file changed, 10 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 0fe8461..864d7eb 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1468,6

[dm-devel] [PATCH v3 03/17] multipathd: cleanup marginal paths checking timers

2019-03-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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed

[dm-devel] [PATCH v3 15/17] multipathd: ignore "disable_changed_wwids"

2019-03-30 Thread Benjamin Marzinski
From: Martin Wilck This option has no effect any more. Signed-off-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/config.c | 1 - libmultipath/config.h | 1 - libmultipath/dict.c| 18 +++--- multipath/multipath.conf.5 | 8 ++-- 4 files

[dm-devel] [PATCH v3 16/17] multipathd: Don't use fallback code after getting wwid

2019-03-30 Thread Benjamin Marzinski
, but that's a small price to pay for doing the right thing most of the time. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 22 +- libmultipath/discovery.h | 3 ++- multipathd/main.c| 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git

[dm-devel] [PATCH v3 00/17] Misc Multipath patches

2019-03-30 Thread Benjamin Marzinski
devices, to grab the wwid directly from sysfs. Benjamin Marzinski (15): libmulitpath: disable user_friendly_names for NetApp libmultipath: handle existing paths in marginal_path enqueue multipathd: cleanup marginal paths checking timers libmultipath: fix marginal paths q

[dm-devel] [PATCH v3 06/17] multipathd: Fix miscounting active paths

2019-03-30 Thread Benjamin Marzinski
orrect. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 11 ++- multipath/main.c | 2 +- multipathd/main.c| 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/disco

[dm-devel] [PATCH v3 12/17] libmulitpath: cleanup uid_fallback code

2019-03-30 Thread Benjamin Marzinski
of these changes should make the code function any differently. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 85 ++-- 1 file changed, 46 insertions(+), 39 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index bece67c

[dm-devel] [PATCH v3 02/17] libmultipath: handle existing paths in marginal_path enqueue

2019-03-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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 6 ++ 1 file changed, 2 insertions(+), 4

[dm-devel] [PATCH v3 01/17] BZ 1668693: disable user_friendly_names for NetApp

2019-03-30 Thread Benjamin Marzinski
config. Reviewed-by: Martin Wilck 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

[dm-devel] [PATCH v3 05/17] libmultipath: fix marginal_paths nr_active check

2019-03-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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file

[dm-devel] [PATCH v3 17/17] libmultipath: silence dm_is_mpath error messages

2019-03-30 Thread Benjamin Marzinski
When "multipath -F" is run, dm_is_mpath was printing error messages about partition devices, because they had already been removed, when it checked. Lower the error logging level so this doesn't happen on the default verbosity. Signed-off-by: Benjamin Marzinski --- libmultipath/devma

[dm-devel] [PATCH v3 09/17] multipathd: use update_path_groups instead of reload_map

2019-03-30 Thread Benjamin Marzinski
reload_map() doesn't do the work to sync the state after reloading the map. Instead of calling it directly, cli_reload() and uev_update_path() should call update_path_groups(), which calls reload_map() with all the necessary syncing. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski

[dm-devel] [PATCH v3 13/17] multipathd: handle changed wwids by removal and addition

2019-03-30 Thread Benjamin Marzinski
s the path. This is patch is heavily based on the previous patch of the same name by Martin Wilck. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index 7a317d

[dm-devel] [PATCH v3 08/17] libmutipath: continue to use old state on PATH_PENDING

2019-03-30 Thread Benjamin Marzinski
ing. But otherwise, pathinfo() should leave the previous state alone. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index b08cb2d..28c0

[dm-devel] [PATCH v3 04/17] libmultipath: fix marginal paths queueing errors

2019-03-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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath

[dm-devel] [PATCH v3 07/17] multipathd: ignore failed wwid recheck

2019-03-30 Thread Benjamin Marzinski
failed. Multipathd should neither set nor clear wwid_changed if get_uid() returned failure. Also, scsi_uid_fallback() should retain the old return value if it doesn't attempt to fallback. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 6 +++--- multipathd/main.c| 6

Re: [dm-devel] multipathd ignoring dev_loss_tmo setting

2019-02-28 Thread Benjamin Marzinski
On Thu, Feb 28, 2019 at 11:38:22AM +, Martins, Bruno O wrote: > Hello guys, > > I am trying to modify /etc/multipath.conf on my system so that the > parameter 'dev_loss_tmo' is changed from the default value. > > However, when checking the value currently in use I am getting the > wrong

Re: [dm-devel] multipathd ignoring dev_loss_tmo setting

2019-03-01 Thread Benjamin Marzinski
On Fri, Mar 01, 2019 at 10:04:52AM +, Martins, Bruno O wrote: > On Thu, 2019-02-28 at 13:53 -0600, Benjamin Marzinski wrote: > > On Thu, Feb 28, 2019 at 11:38:22AM +, Martins, Bruno O wrote: > > > Hello guys, > > > > > > I am trying to modify

[dm-devel] [PATCH 7/9] multipathd: ignore failed wwid recheck

2019-02-22 Thread Benjamin Marzinski
the wwid. Even if get_uid() failed because the path was down, it no change uevent happend when it later became active, multipathd would continue to ignore the path. Instead, multipathd should neither set nor clear wwid_changed if get_uid() returned failure. Signed-off-by: Benjamin Marzinski

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

2019-02-22 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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file

[dm-devel] [PATCH 6/9] multipathd: Fix miscounting active paths

2019-02-22 Thread Benjamin Marzinski
orrect. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 11 ++- multipath/main.c | 2 +- multipathd/main.c| 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 10bd8cd..729bcb9

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

2019-02-22 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

[dm-devel] [PATCH 3/9] multipathd: cleanup marginal paths checking timers

2019-02-22 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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed

[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 8/9] libmutipath: continue to use old state on PATH_PENDING

2019-02-22 Thread Benjamin Marzinski
ing. But otherwise, pathinfo() should leave the previous state alone. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 729bcb9..d3585f9 100644 --- a/libmultip

[dm-devel] [PATCH 9/9] multipathd: use update_path_groups instead of reload_map

2019-02-22 Thread Benjamin Marzinski
reload_map() doesn't do the work to sync the state after reloading the map. Instead of calling it directly, cli_reload() and uev_update_path() should call update_path_groups(), which calls reload_map() with all the necessary syncing. Signed-off-by: Benjamin Marzinski --- multipathd

Re: [dm-devel] [PATCH 7/9] multipathd: ignore failed wwid recheck

2019-02-26 Thread Benjamin Marzinski
On Tue, Feb 26, 2019 at 10:42:49AM +0100, Martin Wilck wrote: > On Fri, 2019-02-22 at 10:58 -0600, Benjamin Marzinski wrote: > > If disable_changed_wwids is set, when multipathd gets a change event > > on > > a path, it verifies that the wwid hasn't changed in > > uev_up

Re: [dm-devel] [PATCH 8/9] libmutipath: continue to use old state on PATH_PENDING

2019-02-26 Thread Benjamin Marzinski
On Tue, Feb 26, 2019 at 11:12:47AM +0100, Martin Wilck wrote: > On Fri, 2019-02-22 at 10:58 -0600, Benjamin Marzinski wrote: > > When pathinfo() sets pp->state to PATH_PENDING, it can cause problems > > with path checking. It should act more like check_path(). When > >

Re: [dm-devel] [PATCH 9/9] multipathd: use update_path_groups instead of reload_map

2019-02-26 Thread Benjamin Marzinski
On Tue, Feb 26, 2019 at 11:47:29AM +0100, Martin Wilck wrote: > On Fri, 2019-02-22 at 10:58 -0600, Benjamin Marzinski wrote: > > reload_map() doesn't do the work to sync the state after reloading > > the > > map. Instead of calling it directly, cli_reload() and > > u

[dm-devel] [PATCH v2 01/12] libmultipath: disable user_friendly_names for NetApp

2019-03-08 Thread Benjamin Marzinski
config. Reviewed-by: Martin Wilck 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

[dm-devel] [PATCH v2 02/12] libmultipath: handle existing paths in marginal_path enqueue

2019-03-08 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 v2 06/12] multipathd: Fix miscounting active paths

2019-03-08 Thread Benjamin Marzinski
orrect. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 11 ++- multipath/main.c | 2 +- multipathd/main.c| 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/disco

[dm-devel] [PATCH v2 03/12] multipathd: cleanup marginal paths checking timers

2019-03-08 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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 8 multipathd/main.c | 3 ++- 2 files changed

[dm-devel] [PATCH v2 09/12] multipathd: use update_path_groups instead of reload_map

2019-03-08 Thread Benjamin Marzinski
reload_map() doesn't do the work to sync the state after reloading the map. Instead of calling it directly, cli_reload() and uev_update_path() should call update_path_groups(), which calls reload_map() with all the necessary syncing. Signed-off-by: Benjamin Marzinski --- multipathd

[dm-devel] [PATCH v2 00/12] Misc Multipath patches

2019-03-08 Thread Benjamin Marzinski
submitting the patch. But I still not sure that its not better simply to assume that if get_uid() fails, that it did so for some mundane reason, and simply keep the old wwid. Benjamin Marzinski (12): libmultipath: disable user_friendly_names for NetApp libmultipath: handl

[dm-devel] [PATCH v2 04/12] libmultipath: fix marginal paths queueing errors

2019-03-08 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 08/12] libmutipath: continue to use old state on PATH_PENDING

2019-03-08 Thread Benjamin Marzinski
ing. But otherwise, pathinfo() should leave the previous state alone. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index b08cb2d..28c0

[dm-devel] [PATCH v2 05/12] libmultipath: fix marginal_paths nr_active check

2019-03-08 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. Reviewed-by: Martin Wilck Signed-off-by: Benjamin Marzinski --- libmultipath/io_err_stat.c | 2 +- 1 file

[dm-devel] [PATCH v2 11/12] libmultipath: add get_uid fallback code for NVMe devices

2019-03-08 Thread Benjamin Marzinski
If multipath can't get the uid for NVMe devices from udev, it can get it directly from sysfs. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 49 1 file changed, 34 insertions(+), 15 deletions(-) diff --git a/libmultipath/discovery.c b

[dm-devel] [PATCH v2 07/12] multipathd: ignore failed wwid recheck

2019-03-08 Thread Benjamin Marzinski
failed. Multipathd should neither set nor clear wwid_changed if get_uid() returned failure. Also, scsi_uid_fallback() should retain the old return value if it doesn't attempt to fallback. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 6 +++--- multipathd/main.c| 6

[dm-devel] [PATCH v2 12/12] multipathd: change failed get_uid handling

2019-03-08 Thread Benjamin Marzinski
uid() use the fallback methods, pathinfo now sets pp->retriggers to the retrigger_tries once a WWID has be successfully obtained, so that it uid_fallback() doesn't need to be called retrigger_tries times before trying the fallback methods. Signed-off-by: Benjamin Marzinski --- libmultipath/disco

[dm-devel] [PATCH v2 10/12] multipath.conf: add missing options to man page

2019-03-08 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- multipath/multipath.conf.5 | 8 1 file changed, 8 insertions(+) diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 index 0fe8461..1e0714f 100644 --- a/multipath/multipath.conf.5 +++ b/multipath/multipath.conf.5 @@ -1494,6 +1494,8

Re: [dm-devel] [PATCH v3 00/10] multipath-tools: avoid I/O during uevent processing

2019-03-19 Thread Benjamin Marzinski
> and made it attempt to read INQUIRY data from sysfs. > > Regards, > Martin Reviewed-by: Benjamin Marzinski for the set. > Changes v2->v3: > > - added 8/10 "tidy up do_set_from_hwe() with statement expression" >(Hannes), renumber subsequent patches a

Re: [dm-devel] [PATCH v3 05/10] libmultipath: detect_alua(): use system timeout

2019-03-19 Thread Benjamin Marzinski
e we deal with verbosity, where, we track it outside of the config structure. But that doesn't need to be dealt with now, so Reviewed-by: Benjamin Marzinski > Signed-off-by: Martin Wilck > --- > libmultipath/discovery.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletio

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-19 Thread Benjamin Marzinski
On Mon, Mar 18, 2019 at 01:12:32PM +0100, Martin Wilck wrote: > Hi Ben, hi Christophe, > > after reviewing Ben's last patch set, I've been pondering over the > handling of changed WWIDs, which seems to have become a bit too clever > and complex for my taste, and I came up with this new approach >

Re: [dm-devel] [PATCH v2 07/12] multipathd: ignore failed wwid recheck

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:48:49PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > If disable_changed_wwids is set, when multipathd gets a change event > > on > > a path, it verifies that the wwid hasn't changed in > > uev_up

Re: [dm-devel] [PATCH v2 10/12] multipath.conf: add missing options to man page

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:49:26PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > Signed-off-by: Benjamin Marzinski > > --- > > multipath/multipath.conf.5 | 8 > > 1 file changed, 8 insertions(+) > > >

Re: [dm-devel] [PATCH v2 11/12] libmultipath: add get_uid fallback code for NVMe devices

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:49:41PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > If multipath can't get the uid for NVMe devices from udev, it can get > > it > > directly from sysfs. > > > >

Re: [dm-devel] [PATCH v2 12/12] multipathd: change failed get_uid handling

2019-03-19 Thread Benjamin Marzinski
On Fri, Mar 15, 2019 at 12:50:14PM +0100, Martin Wilck wrote: > On Fri, 2019-03-08 at 17:12 -0600, Benjamin Marzinski wrote: > > Instead of ignoring failed get_uid() calls, multipathd now fails the > > path as it originally did. > > This patch reverts much of 07/12; I'd ap

Re: [dm-devel] multipathd ignoring dev_loss_tmo setting

2019-03-12 Thread Benjamin Marzinski
On Mon, Mar 04, 2019 at 09:48:59AM +, Martins, Bruno O wrote: > On Fri, 2019-03-01 at 11:35 -0600, Benjamin Marzinski wrote: > > On Fri, Mar 01, 2019 at 10:04:52AM +, Martins, Bruno O wrote: > > > On Thu, 2019-02-28 at 13:53 -0600, Benjamin Marzinski wrote: > >

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-22 Thread Benjamin Marzinski
On Fri, Mar 22, 2019 at 12:28:56PM +0100, Martin Wilck wrote: > On Thu, 2019-03-21 at 17:31 -0500, Benjamin Marzinski wrote: > > > > ideally, we would be able to determine whether or not udev was able > > to > > get all the necessary information. It would be nice to

Re: [dm-devel] [PATCH 0/3] New approach at handling changed WWIDs

2019-03-21 Thread Benjamin Marzinski
On Wed, Mar 20, 2019 at 09:37:35AM +0100, Martin Wilck wrote: > On Tue, 2019-03-19 at 19:44 +0100, Martin Wilck wrote: > > On Tue, 2019-03-19 at 12:11 -0500, Benjamin Marzinski wrote: > > > On Mon, Mar 18, 2019 at 01:12:32PM +0100, Martin Wilck wrote: > >

[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 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 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] 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

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 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 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 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

[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

[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 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 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 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 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

Re: [dm-devel] [PATCH v2] multipathd: fix client response for socket activation

2019-05-15 Thread Benjamin Marzinski
eans to "know" which commands require the configuration stage to > complete and which do not. > > v2: Removed an unrelated, unnecessary hunk in child(). Reviewed-by: Benjamin Marzinski > > Signed-off-by: Martin Wilck > --- > multipathd/main.c | 27 ++

Re: [dm-devel] [PATCH v2] multipath -u: test socket connection in non-blocking mode

2019-05-15 Thread Benjamin Marzinski
On Thu, Apr 25, 2019 at 09:33:03PM +0200, Martin Wilck wrote: > On Wed, 2019-04-24 at 11:07 +0200, Martin Wilck wrote: > > Since commit d7188fcd "multipathd: start daemon after udev trigger", > > multipathd startup is delayed during boot until after "udev settle" > > terminates. But "multipath -u"

Re: [dm-devel] [PATCH 4/4] libmultipath: get_prio(): don't reset prio for inaccessible paths

2019-05-15 Thread Benjamin Marzinski
On Thu, Apr 11, 2019 at 12:49:23PM +0200, Martin Wilck wrote: > pathinfo() doesn't call get_prio() if a path is down, now keeping the old > priority value. But if a path becomes inaccessible between the state check > and the get_prio() call, retrieving the priority will likely fail, and the > path

Re: [dm-devel] [PATCH] libmultipath: get_prio(): really don't reset prio for inaccessible paths

2019-05-16 Thread Benjamin Marzinski
On Thu, May 16, 2019 at 09:10:24AM +0200, Martin Wilck wrote: > As pointed out by Ben Marzinski, my previous patch ebbb56f2 doesn't do what > it pretends to do. > > Fixes: ebbb56f2 "libmultipath: get_prio(): don't reset prio for inaccessible > paths" Review

Re: [dm-devel] [PATCH v2] multipath -u: test socket connection in non-blocking mode

2019-05-16 Thread Benjamin Marzinski
On Thu, May 16, 2019 at 08:44:56AM +0200, Martin Wilck wrote: > On Mon, 2019-04-29 at 16:38 -0500, Benjamin Marzinski wrote: > > On Thu, Apr 25, 2019 at 09:33:03PM +0200, Martin Wilck wrote: > > > > > > @Ben, I'd be grateful if you could try it (or have the user try it)

[dm-devel] [PATCH 2/4] kpartx: fail if dup() of dasd file descriptor fails

2019-05-17 Thread Benjamin Marzinski
If kpartx fails to create a copy of the dasd file descriptor, it should fail, instead of treating the error value as a valid fd. Found by coverity. Signed-off-by: Benjamin Marzinski --- kpartx/dasd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kpartx/dasd.c b/kpartx/dasd.c index

[dm-devel] [PATCH 4/4] multipathd: handle NULL return from genhelp_handler

2019-05-17 Thread Benjamin Marzinski
parse_cmd() wasn't checking if genhelp_handler() returned NULL. It was simply assuming that it got a string. On NULL, it now returns an error. Found by Coverity. Signed-off-by: Benjamin Marzinski --- multipathd/cli.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH 3/4] multipathd: fix REALLOC_REPLY with max length reply

2019-05-17 Thread Benjamin Marzinski
: cd5a9797e "libmpathcmd(coverity): limit reply length" Signed-off-by: Benjamin Marzinski --- multipathd/cli.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/multipathd/cli.h b/multipathd/cli.h index f3fa077a..32dcffac 100644 --- a/multipathd/cli.h +++ b/

[dm-devel] [PATCH 0/4] Coverity fixes

2019-05-17 Thread Benjamin Marzinski
These are fixes to some issues that coverity pointed out. Benjamin Marzinski (4): libmultipath: handle clock_gettime failures in tur checker kpartx: fail if dup() of dasd file descriptor fails multipathd: fix REALLOC_REPLY with max length reply multipathd: handle NULL return from

[dm-devel] [PATCH 1/4] libmultipath: handle clock_gettime failures in tur checker

2019-05-17 Thread Benjamin Marzinski
If clock_gettime() fails, and multipathd can't figure out when it should time out, it should just default to assuming that it has already timed out. Found by coverity. Signed-off-by: Benjamin Marzinski --- libmultipath/checkers/tur.c | 19 +++ 1 file changed, 15 insertions(+), 4

[dm-devel] [PATCH] libmultipath: make vector_foreach_slot_backwards work as expected

2019-05-24 Thread Benjamin Marzinski
All of the code that uses vector_foreach_slot_backwards() treats "i" as the index of the entry "p", but the way it was coded, that wasn't the case. "i" was the number of the entry counting from 1, not 0. Signed-off-by: Benjamin Marzinski --- libmultipath/vect

Re: [dm-devel] [PATCH] libmultipath: make vector_foreach_slot_backwards work as expected

2019-05-28 Thread Benjamin Marzinski
On Mon, May 27, 2019 at 12:03:59PM +0200, Martin Wilck wrote: > On Fri, 2019-05-24 at 17:41 -0500, Benjamin Marzinski wrote: > > All of the code that uses vector_foreach_slot_backwards() treats "i" > > as > > the index of the entry "p", but the way i

Re: [dm-devel] [PATCH v2 0/9] speeding up mpathpersist

2019-05-29 Thread Benjamin Marzinski
On Mon, May 27, 2019 at 02:59:33PM +0200, Martin Wilck wrote: > We've had reports that mpathpersist doesn't scale well in environments > with lots of IO devices. This patch set tries to address this problem > with a few optimizations: > > - instead of doing a full path discovery at startup, only

[dm-devel] [PATCH] multipath: call store_pathinfo with DI_BLACKLIST

2019-06-03 Thread Benjamin Marzinski
add path will add a blacklisted path. Fixes: ca19f865f "libmultipath: add 'cmd' as argument for get_refwwid()" Cc: Hannes Reinecke Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 3 ++- multipathd/cli_handlers.c | 2 +- 2 files changed, 3 insertions(+), 2 deletion

Re: [dm-devel] [PATCH v2 00/30] multipath-tools: gcc9, VPD parsing, and get_uid fixes

2019-06-25 Thread Benjamin Marzinski
On Mon, Jun 24, 2019 at 11:27:25AM +0200, Martin Wilck wrote: > Hi Christophe, hi Ben, > Reviewed-by: Benjamin Marzinski for the set > This series started out with me trying to fix a couple of warnings > emitted by gcc 9, and grew substantially while I encountered other &g

Re: [dm-devel] [PATCH 05/30] multipath-tools: fix more gcc 9 -Wstringop-truncation warnings

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:27PM +0200, Martin Wilck wrote: > More often than not, this means replacing strncpy() by strlcpy(). This depends on "libmultipath: add size argument to dm_get_uuid()" for the the extra argument in the call to dm_get_uuid() from get_refwwid(). Otherwise, it looks

Re: [dm-devel] [PATCH 00/30] multipath-tools: gcc9, VPD parsing, and get_uid fixes

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:22PM +0200, Martin Wilck wrote: > Hi Christophe, hi Ben, ACK for everything, except my nitpicks for patches 5 and 7. I don't know how much we care about patch 5 temporarily breaking compilation, but it no one else is bothered by it, I would be fine with simply

Re: [dm-devel] [PATCH 07/30] libmpathcmd: use target length in strncpy() call

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:29PM +0200, Martin Wilck wrote: Not a big deal since default socket is a defined string, but since we are writing to _path[1], if DEFAULT_SOCKET were of size >= "sizeof(addr.sun_path) - 1", the strncpy() would fill all of addr.sun_path, without leaving any space for

Re: [dm-devel] [RFC PATCH 2/7] mpathpersist: add option --batch-file (-f)

2019-05-22 Thread Benjamin Marzinski
On Sat, May 18, 2019 at 12:56:58AM +0200, Martin Wilck wrote: > Add the option --batch-file (-f) to mpathpersist. The option argument > is a text file that is parsed line-by-line. Every line of the file is > interpreted as an additional input line for mpathpersist. The initial > "mpathpersist" on

Re: [dm-devel] [RFC PATCH 2/7] mpathpersist: add option --batch-file (-f)

2019-05-22 Thread Benjamin Marzinski
On Sat, May 18, 2019 at 12:56:58AM +0200, Martin Wilck wrote: > Add the option --batch-file (-f) to mpathpersist. The option argument > is a text file that is parsed line-by-line. Every line of the file is > interpreted as an additional input line for mpathpersist. The initial > "mpathpersist" on

Re: [dm-devel] [RFC PATCH 2/7] mpathpersist: add option --batch-file (-f)

2019-05-22 Thread Benjamin Marzinski
On Sat, May 18, 2019 at 12:56:58AM +0200, Martin Wilck wrote: > Add the option --batch-file (-f) to mpathpersist. The option argument > is a text file that is parsed line-by-line. Every line of the file is > interpreted as an additional input line for mpathpersist. The initial > "mpathpersist" on

Re: [dm-devel] [PATCH 1/4] libmultipath: handle clock_gettime failures in tur checker

2019-05-20 Thread Benjamin Marzinski
On Fri, May 17, 2019 at 11:55:48PM +0200, Martin Wilck wrote: > On Fri, 2019-05-17 at 11:14 -0500, Benjamin Marzinski wrote: > > If clock_gettime() fails, and multipathd can't figure out when it > > should > > time out, it should just default to assuming that it has alre

Re: [dm-devel] [PATCH 0/4] multipath-tools: prio handling for offline paths

2019-04-18 Thread Benjamin Marzinski
On Thu, Apr 11, 2019 at 12:49:19PM +0200, Martin Wilck wrote: > A recent bug report revealed that the handling of path priorities is > inconsistent in multipathd when paths fail. In the current code, depending > on timing, the prio of a faild path may be reset to 0, reset to -1 > (PRIO_UNDEF), or

[dm-devel] [RFC PATCH] multipath: check on multipathd without starting it

2019-04-18 Thread Benjamin Marzinski
in having it autoactivate when it gets an interactive command. Signed-off-by: Benjamin Marzinski --- multipath/main.c | 60 +++- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/multipath/main.c b/multipath/main.c index 69141dbc..008e3d3f 10064

<    3   4   5   6   7   8   9   10   11   12   >