Re: [dm-devel] [PATCH v2 41/42] libmultipath: refuse reloading an existing map with different WWID

2020-08-14 Thread Martin Wilck
On Fri, 2020-08-14 at 09:48 +0200, Martin Wilck wrote: > Hi Ben, > > On Thu, 2020-08-13 at 17:23 -0500, Benjamin Marzinski wrote: > > > > I'm > > also open to convinced that it would be o.k. to rename a device > > that > > we > > weren't pl

Re: [dm-devel] [PATCH v2 41/42] libmultipath: refuse reloading an existing map with different WWID

2020-08-14 Thread Martin Wilck
Hi Ben, On Thu, 2020-08-13 at 17:23 -0500, Benjamin Marzinski wrote: > On Wed, Aug 12, 2020 at 01:34:05PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > If a map with given name (alias) already exists with a different > > WWID, > > reloading i

Re: [dm-devel] [PATCH V3] libmultipath: fix a memory leak in set_ble_device

2020-08-13 Thread Martin Wilck
s. > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Liu Thank you. Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v2 0/8] multipath cleanups

2020-08-12 Thread Martin Wilck
o my previous > patchset. > > Changes in v2: > - patch 0003 no longer refactors count_active_paths(), as suggested > by Martin Wilck > - Added patches 0007 & 0008, which are both unrelated minor changes. > > Benjamin Marzinski (8): > Makefile.inc: trim extra informat

Re: [dm-devel] [PATCH v2 7/8] multipathd: unset mpp->hwe when removing map

2020-08-12 Thread Martin Wilck
) > condlog(2, "%s: map flushed", mpp->alias); > } > > + mpp->hwe = NULL; > orphan_paths(vecs->pathvec, mpp, "map flushed"); > remove_map_and_stop_waiter(mpp, vecs); > -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix Imendörffer -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH V3] vector: return false if realloc fails in vector_alloc_slot func

2020-08-12 Thread Martin Wilck
the new allocated slot, and use it by calling > vector_set_slot func. Finally, the data of last slot is lost. > > Here, we rewrite vector_alloc_slot as suggested by Martin Wilck: > - increment v->allocated only after successful allocation, > - avoid the "if (v->slot)"

Re: [dm-devel] [PATCH RFC] multipath-tools: *untested* use sysfs prio also for arrays with dual implicit/explicit alua support

2020-08-11 Thread Martin Wilck
On Mon, 2020-08-10 at 21:27 +, Schremmer, Steven wrote: > An RDAC array configured to run with Linux DM-MP should never report > that it supports implicit and explicit ALUA support. If the array is > configured to run with scsi_dh_rdac then it reports TPGS=0 (none) and > should use rdac prio. T

Re: [dm-devel] Recent multipath-tools patches from Huawei

2020-08-11 Thread Martin Wilck
On Tue, 2020-08-11 at 09:14 +0800, Zhiqiang Liu wrote: > > On 2020/8/10 22:34, Martin Wilck wrote: > > Hi Liu, > > > > thanks again for your valuable contributions and meticulous code > > review. I've added your patches in my upstream-queue branch now: &

Re: [dm-devel] [PATCH V2] vector: return false if realloc fails in vector_alloc_slot func

2020-08-11 Thread Martin Wilck
the new allocated slot, and use it by calling > vector_set_slot func. Finally, the data of last slot is lost. > > Here, we rewrite vector_alloc_slot as suggested by Martin Wilck: > - increment v->allocated only after successful allocation, > - avoid the "if (v->slot)"

Re: [dm-devel] [PATCH V2] libmultipath: fix a memory leak in set_ble_device

2020-08-11 Thread Martin Wilck
Hi Liaxiaokeng, thanks again. I still have minor issues, see below. On Tue, 2020-08-11 at 15:23 +0800, lixiaokeng wrote: > In set_ble_device func, if blist is NULL or ble is NULL, > the vendor and product isn't freed. We think it is not > reasonable that strdup(XXX) is used as set_ble_device > a

Re: [dm-devel] [PATCH V2] libmultipath: free pp if store_path fails in disassemble_map

2020-08-10 Thread Martin Wilck
On Mon, 2020-08-10 at 14:07 -0500, Benjamin Marzinski wrote: > On Mon, Aug 10, 2020 at 02:20:27PM +0200, Martin Wilck wrote: > > Hello Liu, > > > > On Fri, 2020-07-24 at 09:40 +0800, Zhiqiang Liu wrote: > > > In disassemble_map func, one pp will be allocated

Re: [dm-devel] [PATCH 08/35] libmultipath: create bitfield abstraction

2020-08-10 Thread Martin Wilck
Hi Ben, On Mon, 2020-08-10 at 13:05 -0500, Benjamin Marzinski wrote: > On Tue, Aug 04, 2020 at 09:35:08PM +0200, Martin Wilck wrote: > > On Tue, 2020-08-04 at 11:26 -0500, Benjamin Marzinski wrote: > > > > > > I'm also still fuzzy on why we want to sup

[dm-devel] Recent multipath-tools patches from Huawei

2020-08-10 Thread Martin Wilck
Hi Liu, thanks again for your valuable contributions and meticulous code review. I've added your patches in my upstream-queue branch now: https://github.com/openSUSE/multipath-tools/commits/upstream-queue Not applied yet: - libmultipath: free pp if store_path fails in disassemble_map: As n

Re: [dm-devel] [dm- devel][PATCH] vector: return null when realloc fails in vector_alloc_slot func

2020-08-10 Thread Martin Wilck
Hello Liu, On Fri, 2020-07-31 at 18:41 +0800, Zhiqiang Liu wrote: > In vector_alloc_slot func, if REALLOC fails, it means new slot > allocation fails. However, it just update v->allocated and then > return the old v->slot without new slot. So, the caller will take > the last old slot as the new al

Re: [dm-devel] [PATCH] libmultipath: fix a memory leak in set_ble_device

2020-08-10 Thread Martin Wilck
Hello Lixiaokeng, On Thu, 2020-07-30 at 21:27 +0800, lixiaokeng wrote: > Hi. > I'm very sorry for subject mistake in first mail. > > In set_ble_device func, if blist is NULL or ble is NULL, > the vendor and product isn't free. We think it is not > reasonable that strdup(XXX) is used as set_ble_

Re: [dm-devel] [PATCH V2] libmultipath: free pp if store_path fails in disassemble_map

2020-08-10 Thread Martin Wilck
Hello Liu, On Fri, 2020-07-24 at 09:40 +0800, Zhiqiang Liu wrote: > In disassemble_map func, one pp will be allocated and stored in > pgp->paths. However, if store_path fails, pp will not be freed, > then memory leak problem occurs. > > Here, we will call free_path to free pp when store_path fail

Re: [dm-devel] [dm- devel][PATCH] checker: add input check of state in checker_state_name func

2020-08-10 Thread Martin Wilck
bmultipath/checkers.h | 3 ++- > 2 files changed, 17 insertions(+), 12 deletions(-) > Reviewed-by: Martin Wilck Thanks for the patch. Btw, are you currently reviewing multipath-tools with coverity or some similar tool? Martin -- dm-devel mailing list dm-devel@redhat.com https://www.

Re: [dm-devel] [PATCH] libmultipath: fix a memory leak in disassemble_status func

2020-08-06 Thread Martin Wilck
Hi Ben, On Tue, 2020-07-28 at 11:20 -0500, Benjamin Marzinski wrote: > On Tue, Jul 28, 2020 at 09:48:06PM +0800, Zhiqiang Liu wrote: > > In disassemble_status func, for dealing with selector args, > > word is allocated by get_word func. However, word is not freed. > > Then a memory leak occurs. >

Re: [dm-devel] [PATCH 0/6] multipath cleanups

2020-08-06 Thread Martin Wilck
vmapper.c| 5 ++-- > libmultipath/structs.c | 52 --- > -- > libmultipath/structs.h | 2 +- > multipath/main.c| 9 -- > 7 files changed, 39 insertions(+), 37 deletions(-) > For the series, except 3/6: Reviewed-by: Martin Wilck -- Dr. Martin Wi

Re: [dm-devel] [PATCH 3/6] libmultipath: remove code duplication in path counting

2020-08-06 Thread Martin Wilck
On Mon, 2020-07-27 at 14:24 -0500, Benjamin Marzinski wrote: > pathcountgr() is never used except by pathcount(), and neither is the > special case for PATH_WILD. Simplify this and make one function that > is > used by both pathcount() and count_active_paths(). This will be used > again in a future

Re: [dm-devel] [PATCH 2/6] kpartx: fix -Wsign-compare error

2020-08-06 Thread Martin Wilck
ompiler warning to me, as it's only about a "!=" comparison that can hardly produce a wrong or unexpected result. Btw, not that it would matter much, but the value of he BLKSSZGET ioctl is actually unsigned. Anyway, ack. -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE So

Re: [dm-devel] [PATCH] libmultipath: fix null dereference in add

2020-08-05 Thread Martin Wilck
On Mon, 2020-08-03 at 12:35 -0500, Benjamin Marzinski wrote: > On Mon, Aug 03, 2020 at 07:57:01PM +0800, lixiaokeng wrote: > > I got a multipath segfault while running iscsi login/logout and > > following scripts in parallel: > > > > #!/bin/bash > > interval=1 > > while true > > do > >

Re: [dm-devel] libmultipath: fix null dereference

2020-08-05 Thread Martin Wilck
On Wed, 2020-08-05 at 23:28 +0200, Martin Wilck wrote: > On Thu, 2020-07-23 at 01:11 +, lutianxiong wrote: > > > > Check if udev_device_get_devtype return NULL before dereferencing > > it. > > > > Signed-off-by: lutianxiong > > Thanks, this looks

Re: [dm-devel] libmultipath: fix null dereference

2020-08-05 Thread Martin Wilck
On Thu, 2020-07-23 at 01:11 +, lutianxiong wrote: > Hi > I got a multipath segfault while running iscsi login/logout and > following scripts in parallel: > > #!/bin/bash > interval=1 > while true > do > multipath -F &> /dev/null > multipath -r &> /dev/null >

Re: [dm-devel] [PATCH RFC] multipath-tools: *untested* use sysfs prio also for arrays with dual implicit/explicit alua support

2020-08-05 Thread Martin Wilck
both explicit and implicit ALUA support. Maybe Steven can clarify if such RDAC arrays exist, and whether we should use PRIO_SYSFS or PRIO_ALUA for them. Martin On Sat, 2020-07-25 at 00:34 +0200, Xose Vazquez Perez wrote: > Cc: Martin Wilck > Cc: Benjamin Marzinski > Cc: Hannes Reine

Re: [dm-devel] [PATCH 76/80] libmultipath: select_action(): force udev reload for uninitialized maps

2020-08-05 Thread Martin Wilck
On Sun, 2020-07-19 at 22:44 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 01:03:26PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > If we are in the reconfigure() code path, and we encounter maps to > > be reloaded, we usually set the DM_S

Re: [dm-devel] [PATCH 00/74] multipath-tools series part V: removed path handling

2020-08-05 Thread Martin Wilck
On Mon, 2020-07-20 at 01:52 +, Chongyun Wu wrote: > Hi Marin and all, > > With below patches, run up/down script for a week, DM IO blocked > issue not happened again, I think those patches works. > > Tested-by: wuchongyun (Cloud) Thanks a lot! So the hope I expressed in the cover letter cam

Re: [dm-devel] [PATCH 71/74] multipath: use update_pathvec_from_dm()

2020-08-05 Thread Martin Wilck
On Sun, 2020-07-19 at 21:57 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:51:42PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > The multipath-specific function update_paths() can now be replaced > > with > > a call to update_pathv

Re: [dm-devel] [PATCH 65/74] libmultipath: add update_pathvec_from_dm()

2020-08-05 Thread Martin Wilck
On Sat, 2020-07-18 at 23:46 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:51:36PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > It can happen in particular during boot or startup that we > > encounter > > paths as map members which

Re: [dm-devel] [PATCH 69/74] libmultipath: disassemble_map(): get rid of "is_daemon" argument

2020-08-05 Thread Martin Wilck
On Sun, 2020-07-19 at 00:26 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:51:40PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > The reason for the is_daemon parameter in disassemble_map() lies > > deep in multipath-tools' past, in b

Re: [dm-devel] [PATCH 66/74] libmultipath: update_pathvec_from_dm: handle pp->mpp mismatch

2020-08-05 Thread Martin Wilck
On Sun, 2020-07-19 at 00:12 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:51:37PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > Treat this like a WWID mismatch. > > > > Signed-off-by: Martin Wilck > > -

Re: [dm-devel] [PATCH 64/74] multipathd: check_path(): set retrigger_delay if necessary

2020-08-05 Thread Martin Wilck
On Sun, 2020-07-19 at 00:07 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:51:35PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > In a follow up patch, we will set INIT_MISSING_UDEV and set tick=1 > > (minimal) at the same time.

Re: [dm-devel] [PATCH 46/54] libmultipath: path_discover(): always set DI_BLACKLIST

2020-08-05 Thread Martin Wilck
On Fri, 2020-07-17 at 17:21 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:36:15PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > Since 65e1845 ("multipath: call store_pathinfo with DI_BLACKLIST"), > > we > > use DI_BLACKL

Re: [dm-devel] [PATCH 44/54] libmultipath: adopt_paths(): don't bail out on single path failure

2020-08-05 Thread Martin Wilck
On Fri, 2020-07-17 at 16:25 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:36:13PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > If pathinfo fails for one path to be adopted, we currently > > fail the entire function. This may caus

Re: [dm-devel] [PATCH 00/42] multipath-tools series part III: duplicate alias

2020-08-04 Thread Martin Wilck
On Mon, 2020-07-20 at 15:30 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:35:10PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > Hi Christophe, hi Ben, > > > > This is part II of a larger patch series for multpath-tools I'

Re: [dm-devel] [PATCH 12/35] libmultipath: strlcpy()/strlcat(): use restrict qualifier

2020-08-04 Thread Martin Wilck
On Tue, 2020-08-04 at 12:29 -0500, Benjamin Marzinski wrote: > On Tue, Aug 04, 2020 at 05:36:31PM +0200, Martin Wilck wrote: > > On Thu, 2020-07-16 at 17:18 -0500, Benjamin Marzinski wrote: > > > On Thu, Jul 09, 2020 at 12:15:57PM +0200, mwi...@suse.com wrote: > >

Re: [dm-devel] [PATCH 08/35] libmultipath: create bitfield abstraction

2020-08-04 Thread Martin Wilck
On Tue, 2020-08-04 at 11:26 -0500, Benjamin Marzinski wrote: > On Tue, Aug 04, 2020 at 05:18:18PM +0200, Martin Wilck wrote: > > On Tue, 2020-08-04 at 17:04 +0200, Martin Wilck wrote: > > > On Thu, 2020-07-16 at 16:17 -0500, Benjamin Marzinski wrote: > > > > On T

Re: [dm-devel] [PATCH 12/35] libmultipath: strlcpy()/strlcat(): use restrict qualifier

2020-08-04 Thread Martin Wilck
On Thu, 2020-07-16 at 17:18 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:15:57PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > Also remove the redundant local variables. It's not necessary to > > make "restrict" w

Re: [dm-devel] [PATCH 08/35] libmultipath: create bitfield abstraction

2020-08-04 Thread Martin Wilck
On Tue, 2020-08-04 at 17:04 +0200, Martin Wilck wrote: > On Thu, 2020-07-16 at 16:17 -0500, Benjamin Marzinski wrote: > > On Thu, Jul 09, 2020 at 12:15:53PM +0200, mwi...@suse.com wrote: > > > From: Martin Wilck > > > > > > In e32d521d ("libmul

Re: [dm-devel] [PATCH 08/35] libmultipath: create bitfield abstraction

2020-08-04 Thread Martin Wilck
On Thu, 2020-07-16 at 16:17 -0500, Benjamin Marzinski wrote: > On Thu, Jul 09, 2020 at 12:15:53PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > In e32d521d ("libmultipath: coalesce_paths: fix size mismatch > > handling"), > > we introduc

Re: [dm-devel] master - multipathd: fix fd leak when iscsi device logs in

2020-07-15 Thread Martin Wilck
On Tue, 2020-07-14 at 17:22 -0500, Benjamin Marzinski wrote: > On Mon, Jul 13, 2020 at 09:59:43PM +0200, Martin Wilck wrote: > > Comments welcome. > > We've agreed that dm_lib_release() is unnecessary, since we always > call > dm_udev_wait() when update_devs() is ne

Re: [dm-devel] [lvm-devel] master - multipathd: fix fd leak when iscsi device logs in

2020-07-13 Thread Martin Wilck
On Mon, 2020-07-13 at 11:56 +0200, Zdenek Kabelac wrote: > > > @Zdenek, do we have to protect every libdm call, or is it > > sufficient > > to protect only dm_task_run(), as lixiaokeng suggested? > > > > Hi > > It's actually hard to answer it in a simple way. > Several properties are held in li

Re: [dm-devel] [dm-level] master - libmultipath: fix use after free when iscsi logs in

2020-07-13 Thread Martin Wilck
Hello Lixiaokeng, Thanks for the report and the analysis. On Mon, 2020-07-13 at 10:22 +0800, lixiaokeng wrote: > When two iscsi ips log in and out alternately and the following > scripts run > at the same time, > > #!/bin/bash > interval=5 > while true > do > iscsiadm -m node -p 9.41.14

Re: [dm-devel] [lvm-devel] master - multipathd: fix fd leak when iscsi device logs in

2020-07-13 Thread Martin Wilck
On Mon, 2020-07-13 at 12:13 +0200, Zdenek Kabelac wrote: > Dne 13. 07. 20 v 12:08 Martin Wilck napsal(a): > > > > Ben has already added support for dm_hold_control_dev() in > > libmultipath > > (e24d8b1 ("libmutipath: don't close fd on dm_lib_release"))

Re: [dm-devel] [lvm-devel] master - multipathd: fix fd leak when iscsi device logs in

2020-07-13 Thread Martin Wilck
Hi Zdenek, On Mon, 2020-07-13 at 11:56 +0200, Zdenek Kabelac wrote: > Dne 13. 07. 20 v 11:21 Martin Wilck napsal(a): > > Hi Lixiaokeng, > > > > > > @Zdenek, do we have to protect every libdm call, or is it > > sufficient > > to protect only dm_task_run()

Re: [dm-devel] [lvm-devel] master - multipathd: fix fd leak when iscsi device logs in

2020-07-13 Thread Martin Wilck
> static int _version_ok = 1; > > > @@ -404,10 +406,19 @@ static void _close_control_fd(void) > > > #ifdef DM_IOCTLS > > > static int _open_and_assign_control_fd(const char *control) > > > { > > > +pthread_mutex_lock(&_control_fd_mutex); > > &g

Re: [dm-devel] [PATCH]libmultipath/dmparser: add missing path with good status when sync state with dm kernel

2020-07-09 Thread Martin Wilck
Hi Chongyun, On Wed, 2020-07-08 at 01:47 +, Chongyun Wu wrote: > Hello Martin, > Thanks for your reply. > Waiting for your patches I'd like to test it. And also, I'd like to > tell more detail about this issue. Please check out the series I just posted. Part V is what matters for your use c

Re: [dm-devel] [PATCH] multipath-tools: add info to man page for the historical-service-time path selector

2020-07-07 Thread Martin Wilck
On Tue, 2020-07-07 at 17:44 -0400, Gabriel Krisman Bertazi wrote: > Xose Vazquez Perez writes: > > > Cc: Khazhismel Kumykov > > Cc: Gabriel Krisman Bertazi > > Cc: Martin Wilck > > Cc: Benjamin Marzinski > > Cc: Christophe Varoqui > > Cc: DM-DEVEL

Re: [dm-devel] [PATCH] libmultipath: add device to hwtable.c

2020-07-07 Thread Martin Wilck
Hi Steve, On Mon, 2020-07-06 at 20:22 +, Schremmer, Steven wrote: > From: Steve Schremmer > > Add FUJITSU ETERNUS_AHB defaults. > > Signed-off-by: Steve Schremmer > --- > libmultipath/hwtable.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/libmultipath/hwtabl

Re: [dm-devel] [PATCH]libmultipath/dmparser: add missing path with good status when sync state with dm kernel

2020-07-07 Thread Martin Wilck
Hello Chongyun, On Tue, 2020-07-07 at 03:08 +, Chongyun Wu wrote: > Hi Martin and Ben, > > Cloud you help to view below patch, thanks. > > > From b2786c81a78bf3868f300fd3177e852e718e7790 Mon Sep 17 00:00:00 > > 2001 > From: Chongyun Wu > Date: Mon, 6 Jul 2020 11:22:21 +0800 > Subject: [PATC

Re: [dm-devel] [PATCH] libmultipath: add device to hwtable.c

2020-07-06 Thread Martin Wilck
On Mon, 2020-07-06 at 20:22 +, Schremmer, Steven wrote: > From: Steve Schremmer > > Add FUJITSU ETERNUS_AHB defaults. > > Signed-off-by: Steve Schremmer > --- > libmultipath/hwtable.c | 16 > 1 file changed, 16 insertions(+) Thanks! Reviewed-b

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-03 Thread Martin Wilck
nd reason about it. We were just looking for the best way to safely flush maps in multipath-tools, and I'd considered deferred remove as one option, which it most likely is not. Anyway, I like to understand why thinks are the way they are, so thanks again. Cheers, Martin -- Dr. Martin Wilck ,

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-03 Thread Martin Wilck
On Thu, 2020-07-02 at 14:41 -0500, Benjamin Marzinski wrote: > On Thu, Jul 02, 2020 at 04:45:21PM +0000, Martin Wilck wrote: > > > > What's wrong with deferred remove? After all, the user explicitly > > asked > > for a flush. As long as some other process has

Re: [dm-devel] [PATCH 2/3] libmutipath: don't close fd on dm_lib_release

2020-07-03 Thread Martin Wilck
On Thu, 2020-07-02 at 15:06 -0500, Benjamin Marzinski wrote: > On Thu, Jul 02, 2020 at 11:52:21AM +0000, Martin Wilck wrote: > > On Wed, 2020-03-25 at 17:00 -0500, Benjamin Marzinski wrote: > > > On Wed, Mar 25, 2020 at 03:52:55PM -0500, Benjamin Marzinski > > > wrote: &

Re: [dm-devel] [PATCH v2 0/4] misc patches

2020-07-03 Thread Martin Wilck
+++ > > kpartx/kpartx.h | 2 ++ > libmultipath/discovery.c | 12 ++--- > libmultipath/propsel.c | 4 ++- > 7 files changed, 87 insertions(+), 32 deletions(-) > For the series: Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107

Re: [dm-devel] [PATCH v3 0/7] Fix muitpath/multipathd flush issue

2020-07-03 Thread Martin Wilck
+++ > multipath/multipath.8 | 4 +-- > multipathd/cli.c | 1 + > multipathd/cli_handlers.c | 19 > multipathd/cli_handlers.h | 1 + > multipathd/main.c | 57 -- > multipathd/main.h | 1 +

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-02 Thread Martin Wilck
On Thu, 2020-07-02 at 10:18 -0500, Benjamin Marzinski wrote: > On Thu, Jul 02, 2020 at 12:24:32PM +0000, Martin Wilck wrote: > > On Wed, 2020-07-01 at 22:14 -0500, Benjamin Marzinski wrote: > > > On Wed, Jul 01, 2020 at 10:54:34PM +0200, Martin Wilck wrote: > > > &g

Re: [dm-devel] [PATCH 4/4] libmultipath: fix checker detection for nvme devices

2020-07-02 Thread Martin Wilck
n when paths are > down" > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 3/4] kpartx: handle alternate bsd disklabel location

2020-07-02 Thread Martin Wilck
ernel partition code expects. kpartx should handle both cases. > > Signed-off-by: Benjamin Marzinski I can see that for parted, but not for the kernel (https://elixir.bootlin.com/linux/latest/source/block/partitions/msdos.c#L368) Anyway: Reviewed-by: Martin Wilck -- Dr. Martin Wilck ,

Re: [dm-devel] [PATCH 2/4] kpartx: read devices with direct IO

2020-07-02 Thread Martin Wilck
ck = (char *) xmalloc(READ_SIZE); > + if (aligned_malloc((void **)&bp->block, secsz, NULL)) { > + fprintf(stderr, "aligned_malloc failed\n"); > + exit(1); > + } > > - if (read(fd, bp->block, READ_SIZE) != READ_SIZE) { > +

Re: [dm-devel] [PATCH 1/4] libmultipath: fix sysfs dev_loss_tmo parsing

2020-07-02 Thread Martin Wilck
ve number. Parsing this was causing sysfs_set_rport_tmo() to fail. Signed-off-by: Benjamin Marzinski Signed-off-by: Martin Wilck --- libmultipath/discovery.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 1d

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-02 Thread Martin Wilck
On Wed, 2020-07-01 at 22:14 -0500, Benjamin Marzinski wrote: > On Wed, Jul 01, 2020 at 10:54:34PM +0200, Martin Wilck wrote: > > On Thu, 2020-06-18 at 18:06 -0500, Benjamin Marzinski wrote: > > > I uploaded the test program, aio_test: > > > > > > https://g

Re: [dm-devel] [PATCH 2/3] libmutipath: don't close fd on dm_lib_release

2020-07-02 Thread Martin Wilck
On Wed, 2020-03-25 at 17:00 -0500, Benjamin Marzinski wrote: > On Wed, Mar 25, 2020 at 03:52:55PM -0500, Benjamin Marzinski wrote: > > On Wed, Mar 25, 2020 at 03:16:50PM +0000, Martin Wilck wrote: > > > On Tue, 2020-03-24 at 16:03 -0500, Benjamin Marzinski wrote: > > >

Re: [dm-devel] [PATCH v2 7/7] multipath: add option to skip multipathd delegation

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > Add the -D option to allow users to skip delegating commands to > multipathd. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck > --- > libmultipath/config.h | 1 + > multipath/main.c |

Re: [dm-devel] [PATCH v2 6/7] multipath: delegate flushing maps to multipathd

2020-07-01 Thread Martin Wilck
d potential hangs. If delegating to multipathd fails, > multipath > should try the remove itself. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Fel

Re: [dm-devel] [PATCH v2 4/7] multipathd: add "del maps" multipathd command

2020-07-01 Thread Martin Wilck
On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote: > This will flush all multipath devices. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-07-01 Thread Martin Wilck
immediately fail all outstanding commands when queue_if_no_path was deactivated? (just speculating, I don't know if this is the case). Regards, Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix Imendörffer --

Re: [dm-devel] [PATCH v2 2/7] multipathd: fix check_path errors with removed map

2020-07-01 Thread Martin Wilck
ate) { > + !disable_reinstate) > /* Clear IO errors */ > - if (reinstate_path(pp)) { > - condlog(3, "%s: reload map", pp->dev); > - ev_add_path(pp, vecs, 1); > -

Re: [dm-devel] [PATCH v2 1/7] libmultipath: make dm_get_map/status return codes symbolic

2020-07-01 Thread Martin Wilck
goto out; > } > @@ -557,9 +557,9 @@ add_map_without_path (struct vectors *vecs, const > char *alias) > mpp->mpe = find_mpe(conf->mptable, mpp->wwid); > put_multipath_config(conf); > > - if (update_multipath_table(mpp, vecs->pathvec, 1)) > +

Re: [dm-devel] [PATCH] 11-dm-mpath.rules: Fix udev rule processing during coldplug

2020-06-29 Thread Martin Wilck
Hi Ben, Hi Christophe, On Tue, 2020-06-02 at 16:21 -0500, Benjamin Marzinski wrote: > On Tue, Jun 02, 2020 at 05:54:43PM +0200, mwi...@suse.com wrote: > > From: Martin Wilck > > > > DM_SUBSYSTEM_UDEV_FLAG0 is used to indicate that upper layer > > udev rules don

Re: [dm-devel] [PATCH 2/7] multipathd: fix check_path errors with removed map

2020-06-24 Thread Martin Wilck
ipath device reappears, is actually a problem for > users. > Having multipathd take a bit of time and pointless effort to catch up > after multiple changes happen at once doesn't effect users > noticeably. > > Since the checkerloop thread spends the vast majority of it&

Re: [dm-devel] [PATCH 2/7] multipathd: fix check_path errors with removed map

2020-06-19 Thread Martin Wilck
On Fri, 2020-06-19 at 11:52 -0500, Benjamin Marzinski wrote: > On Fri, Jun 19, 2020 at 01:42:47PM +0000, Martin Wilck wrote: > > On Thu, 2020-06-18 at 18:17 -0500, Benjamin Marzinski wrote: > > > On Thu, Jun 18, 2020 at 07:34:38PM +, Martin Wilck wrote: > > >

Re: [dm-devel] [PATCH 2/7] multipathd: fix check_path errors with removed map

2020-06-19 Thread Martin Wilck
On Thu, 2020-06-18 at 18:17 -0500, Benjamin Marzinski wrote: > On Thu, Jun 18, 2020 at 07:34:38PM +0000, Martin Wilck wrote: > > On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote: > > > > > > static void > > > @@ -2088,8 +2084,13 @@ check_path (stru

Re: [dm-devel] [PATCH 4/7] multipathd: add "del maps" multipathd command

2020-06-19 Thread Martin Wilck
On Thu, 2020-06-18 at 18:12 -0500, Benjamin Marzinski wrote: > On Thu, Jun 18, 2020 at 08:37:20PM +0000, Martin Wilck wrote: > > > > > -int dm_flush_maps (int retries) > > > +int dm_flush_maps (int need_suspend, int retries) > > > { > >

Re: [dm-devel] [PATCH 7/7] multipath: add option to skip multipathd delegation

2020-06-18 Thread Martin Wilck
useless, but the presence of this option suggests to users that they may want to use it, which I doubt. Perhaps we want to have it, for debugging or expert usage purpose, as a hidden/undocumented option? Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germa

Re: [dm-devel] [PATCH 6/7] multipath: delegate flushing maps to multipathd

2020-06-18 Thread Martin Wilck
d potential hangs. If delegating to multipathd fails, > multipath > should try the remove itself. > > Signed-off-by: Benjamin Marzinski Reviewed-by: Martin Wilck (but see remark on patch 4/7). -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB

Re: [dm-devel] [PATCH 5/7] multipath: make flushing maps work like other commands

2020-06-18 Thread Martin Wilck
On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote: > The config structure doesn't need a special variable just for > removes. > Multipath can just use the cmd variable, like it does for the other > commands. > > Signed-off-by: Benjamin Marzinski Reviewed-by

Re: [dm-devel] [PATCH 4/7] multipathd: add "del maps" multipathd command

2020-06-18 Thread Martin Wilck
_suspend and dm_suspend_and_flush_map() entirely. It would simplify the _dm_flush_map code path significantly. As we determined that we use the suspend/resume only in multipath anyway, we could add it there in the "non-delegated" code path. Thanks, Martin -- Dr. Martin Wilck , Tel. +49

Re: [dm-devel] [PATCH 3/7] libmultipath: make dm_flush_maps only return 0 on success

2020-06-18 Thread Martin Wilck
ss. > > Signed-off-by: Benjamin Marzinski > --- > libmultipath/devmapper.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnbe

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-06-18 Thread Martin Wilck
On Thu, 2020-06-18 at 13:04 -0500, Benjamin Marzinski wrote: > On Thu, Jun 18, 2020 at 09:00:49AM +0000, Martin Wilck wrote: > > > > With queue_if_no_paths, there could be outstanding IO even if the > > opencount was 0. > > This is what I don't accept at f

Re: [dm-devel] [PATCH 2/7] multipathd: fix check_path errors with removed map

2020-06-18 Thread Martin Wilck
/* Clear IO errors */ > - if (reinstate_path(pp)) { > - condlog(3, "%s: reload map", pp->dev); > - ev_add_path(pp, vecs, 1); > - pp->tick = 1; > - return 0; > - } > - } else { > + reinstate_path(pp); > + else { > LOG_MSG(4, verbosity, pp); > if (pp->checkint != max_checkint) { > /* -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix Imendörffer -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 1/7] libmultipath: change do_get_info returns

2020-06-18 Thread Martin Wilck
alue scheme for libmultipath, defining specific enums for every function doesn't scale. But do it here for now nonetheless, please. Apart from that, ok. Regards Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix Ime

Re: [dm-devel] [PATCH 0/7] Fix muitpath/multipathd flush issue

2020-06-18 Thread Martin Wilck
load, which implies a suspend, too. Perhaps simply an fsync() on the dm device, or just wait a while until all outstanding IO has errored out? But these alternatives don't actually look better to me than Hannes' suspend/resume, they will take at least as much time. Do you have a better ide

Re: [dm-devel] [PATCH v2] multipath: Fix compiler warnings when built without systemd.

2020-06-17 Thread Martin Wilck
On Wed, 2020-06-17 at 01:11 +0200, Marius Bakke wrote: > Add ifdef guards for code that is unused when systemd is not > available. > --- > libmultipath/config.c | 6 -- > multipathd/main.c | 10 +- > 2 files changed, 13 insertions(+), 3 deletions(-) > Revi

Re: [dm-devel] [PATCH] multipath-tools: Fix compiler warnings when built without systemd.

2020-06-16 Thread Martin Wilck
Hello Marius, On Sat, 2020-05-16 at 19:55 +0200, Marius Bakke wrote: > --- > libmultipath/config.c | 2 +- > multipathd/main.c | 19 +-- > 2 files changed, 14 insertions(+), 7 deletions(-) > thank you for the patch, and sorry for the late reply. Thanks to Xose, too, for mak

Re: [dm-devel] [PATCH v2 0/3] multipath: change default devnode blacklist

2020-06-09 Thread Martin Wilck
> tests/parser.c | 42 ++ > tests/test-lib.c | 2 +- > 7 files changed, 215 insertions(+), 66 deletions(-) > Very nice work, thank you! Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Sol

Re: [dm-devel] [PATCH 0/2] multipath-tools: disable foreign libraries by default

2020-06-08 Thread Martin Wilck
Hi Ben, On Fri, 2020-05-08 at 21:33 +0200, mwi...@suse.com wrote: > From: Martin Wilck > > Hi Christophe, > > This is a follow-up to the previous discussion with topic 'RFC: > multipath-tools: NVMe native multipath and default setting for > "enable_foreign&q

Re: [dm-devel] [RFC PATCH 0/2] multipath: change default devnode blacklist

2020-06-06 Thread Martin Wilck
On Fri, 2020-06-05 at 17:27 -0500, Benjamin Marzinski wrote: > On Fri, Jun 05, 2020 at 07:20:26PM +0000, Martin Wilck wrote: > > Hi Ben, > > > > On Thu, 2020-06-04 at 19:30 -0500, Benjamin Marzinski wrote: > > > I recently got a request to add the Oracle ASM filer

Re: [dm-devel] [PATCH] libmultipath: fix condlog NULL argument in uevent_get_env_var

2020-06-05 Thread Martin Wilck
7;%s'", __func__, attr, p); > | ^~ > > If p is NULL, use "(null)" instead. > > Signed-off-by: Benjamin Marzinski > --- > libmultipath/uevent.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [RFC PATCH 0/2] multipath: change default devnode blacklist

2020-06-05 Thread Martin Wilck
ng a "bool negate" field in struct blentry and some simple parser logic), and could be applied to other REs in the config file as well. We could print this with "multipath -t", and we wouldn't need to document an exception. It's also pretty much backwards-compat

Re: [dm-devel] [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.

2020-05-29 Thread Martin Wilck
On Fri, 2020-05-29 at 11:19 -0500, Benjamin Marzinski wrote: > On Fri, May 29, 2020 at 09:12:30AM +0000, Martin Wilck wrote: > > > > Did you see > > https://www.redhat.com/archives/dm-devel/2020-May/msg00261.html ? > > Nope. Overlooked it. My bad. I'm fin

Re: [dm-devel] [PATCH 1/1] libdmmp: Add support for upcoming json-c 0.14.0.

2020-05-29 Thread Martin Wilck
hought the change from boolean to int is a step in the wrong direction, therefore I submitted my modified version using stdboolh. If everyone else is fine with the int, it's not worth arguing about it. Regards, Martin PS: Can anyone explain why json-c did this? Looks like a "cause hassle

Re: [dm-devel] multipath-tools: -1patch in upstream-queue

2020-05-20 Thread Martin Wilck
json-c people did this, but I'd rather fall back to stdbool.h than to 0 and 1. I'm going to send a modified verson. Regards Martin -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix Imendörffer -- dm-devel mailing list

Re: [dm-devel] [PATCH v3 0/6] multipath: path validation library prep work

2020-05-20 Thread Martin Wilck
ed, it will always be claimed as a valid path. > > Patches 0001 & 0002 are the same as in my "RFC PATCH v2" set, and > patch > 0005 is the same as my "libmultipath: simplify failed wwid code" > patch. > > Only patches 0003 and 0004 haven't been poste

Re: [dm-devel] [PATCH v2 0/6] multipath: path validation library prep work

2020-05-19 Thread Martin Wilck
currently multipathed, it will always be claimed as a valid path. > > Patches 0001 & 0002 are the same as in my "RFC PATCH v2" set, and > patch > 0005 is the same as my "libmultipath: simplify failed wwid code" > patch. > > Only patches 0003 and 000

Re: [dm-devel] [PATCH 3/6] multipath: centralize validation code

2020-05-18 Thread Martin Wilck
On Mon, 2020-05-18 at 13:53 -0500, Benjamin Marzinski wrote: > On Fri, May 15, 2020 at 08:37:16PM +0000, Martin Wilck wrote: > > On Thu, 2020-05-14 at 20:59 -0500, Benjamin Marzinski wrote: > > > This code pulls the multipath path validation code out of > > > configur

Re: [dm-devel] [PATCH 4/6] Unit tests for is_path_valid()

2020-05-16 Thread Martin Wilck
On Fri, 2020-05-15 at 22:37 +0200, Martin Wilck wrote: > On Thu, 2020-05-14 at 20:59 -0500, Benjamin Marzinski wrote: > > Signed-off-by: Benjamin Marzinski > > Two minor nits below, otherwise ack. > > > --- > > tests/Makefile |

Re: [dm-devel] [PATCH 5/6] libmultipath: simplify failed wwid code

2020-05-15 Thread Martin Wilck
n(), and remove them with unlink(). > > Signed-off-by: Benjamin Marzinski With the follow-up (6/6): Reviewed-by: Martin Wilck -- Dr. Martin Wilck , Tel. +49 (0)911 74053 2107 SUSE Software Solutions Germany GmbH HRB 36809, AG Nürnberg GF: Felix Imendörffer -- dm-devel mailing list dm

Re: [dm-devel] [PATCH 4/6] Unit tests for is_path_valid()

2020-05-15 Thread Martin Wilck
+ assert_int_equal(is_path_valid(name, &conf, &pp, false), > + PATH_IS_NOT_VALID); > + assert_string_equal(pp.dev, name); > + assert_ptr_equal(pp.udev, &test_udev); > + assert_string_equal(pp.wwid, wwid); > + /* test find_multipaths = FIND_MULTIPATHS_OFF */ > +

Re: [dm-devel] [PATCH 3/6] multipath: centralize validation code

2020-05-15 Thread Martin Wilck
t; - * "multipath -u" may be run before the daemon is started. In > this > - * case, systemd might own the socket but might delay > multipathd > - * startup until some other unit (udev settle!) has finished > - * starting. With many LUNs, the listen backlog m

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