Re: [dm-devel] [PATCH v4 09/20] libmultipath: functions to indicate mapping failure in /dev/shm

2018-04-12 Thread Martin Wilck
On Thu, 2018-04-12 at 13:33 -0500, Benjamin Marzinski wrote: > On Wed, Apr 04, 2018 at 06:16:16PM +0200, Martin Wilck wrote: > > Create a simple API that indicates failure to create a map for a > > certain WWID. This will allow multipathd to indicate to other tools > > (in p

Re: [dm-devel] [PATCH v4 16/20] multipath -u : set FIND_MULTIPATHS_WAIT_UNTIL from /dev/shm

2018-04-12 Thread Martin Wilck
On Thu, 2018-04-12 at 13:36 -0500, Benjamin Marzinski wrote: > On Wed, Apr 04, 2018 at 06:16:23PM +0200, Martin Wilck wrote: > > In "find_multipaths smart" mode, use time stamps under > > /dev/shm/multipath/find_multipaths to track waiting for multipath > >

Re: [dm-devel] [PATCH v4 10/20] libmultipath: indicate wwid failure in dm_addmap_create()

2018-04-12 Thread Martin Wilck
On Thu, 2018-04-12 at 16:32 -0500, Benjamin Marzinski wrote: > On Thu, Apr 12, 2018 at 10:22:19PM +0200, Martin Wilck wrote: > > > > But I suppose I'm still missing your point. > > Any failure in ev_add_path() before the call to domap() could cause > multipath device c

Re: [dm-devel] [PATCH v4 10/20] libmultipath: indicate wwid failure in dm_addmap_create()

2018-04-12 Thread Martin Wilck
On Thu, 2018-04-12 at 22:16 +0200, Martin Wilck wrote: > On Thu, 2018-04-12 at 13:33 -0500, Benjamin Marzinski wrote: > > On Wed, Apr 04, 2018 at 06:16:17PM +0200, Martin Wilck wrote: > > > dm_addmap_create() is where we actually try to set up a new > > > multipath m

Re: [dm-devel] [PATCH v4 10/20] libmultipath: indicate wwid failure in dm_addmap_create()

2018-04-12 Thread Martin Wilck
On Thu, 2018-04-12 at 13:33 -0500, Benjamin Marzinski wrote: > On Wed, Apr 04, 2018 at 06:16:17PM +0200, Martin Wilck wrote: > > dm_addmap_create() is where we actually try to set up a new > > multipath map. Depending on the result, mark the wwid as > > failed (or not), and

Re: [dm-devel] [PATCH v3 17/20] multipath -u: test if path is busy

2018-04-12 Thread Martin Wilck
On Thu, 2018-04-12 at 13:41 -0500, Benjamin Marzinski wrote: > On Mon, Apr 02, 2018 at 09:50:48PM +0200, Martin Wilck wrote: > > For "find_multipaths smart", check if a path is already in use > > before setting DM_MULTIPATH_DEVICE_PATH to 1 or 2 (and thus, > > S

Re: [dm-devel] [PATCH v4 18/20] multipath -u: quick check if path is multipathed

2018-04-13 Thread Martin Wilck
On Fri, 2018-04-13 at 11:12 -0500, Benjamin Marzinski wrote: > On Fri, Apr 13, 2018 at 12:19:12AM +0200, Martin Wilck wrote: > > On Thu, 2018-04-12 at 13:46 -0500, Benjamin Marzinski wrote: > > > On Wed, Apr 04, 2018 at 06:16:25PM +0200, Martin Wilck wrote: > > > > Wi

Re: [dm-devel] [PATCH v3 17/20] multipath -u: test if path is busy

2018-04-13 Thread Martin Wilck
On Fri, 2018-04-13 at 10:53 -0500, Benjamin Marzinski wrote: > On Fri, Apr 13, 2018 at 12:17:54AM +0200, Martin Wilck wrote: > > > > As I said already, I don't understand why you say that. > > > > I can assert that if is_failed_wwid() returns true, multipathd has >

[dm-devel] [PATCH] libmultipath: Fix logic in should_multipath

2018-04-13 Thread Martin Wilck
Commit d3b71498 missed a negation. Fixes: d3b71498 "multipath: fix rcu thread cancellation hang" Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/wwids.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/wwids.c b/libmultipath/wwids.

Re: [dm-devel] [PATCH v4 07/20] libmultipath: change find_multipaths option to multi-value

2018-04-13 Thread Martin Wilck
On Wed, 2018-04-04 at 18:16 +0200, Martin Wilck wrote: > diff --git a/libmultipath/wwids.c b/libmultipath/wwids.c > index 11afe09..da685be 100644 > --- a/libmultipath/wwids.c > +++ b/libmultipath/wwids.c > @@ -282,8 +282,12 @@ should_multipath(struct path *pp1, vector > pat

[dm-devel] [PATCH v5 02/22] Revert "multipathd: imply -n if find_multipaths is set"

2018-04-13 Thread Martin Wilck
This reverts commit 64e27ec066a001012f44550f095c93443e91d845. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipathd/main.c | 4 1 file changed, 4 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c in

[dm-devel] [PATCH v5 09/22] libmultipath: functions to indicate mapping failure in /dev/shm

2018-04-13 Thread Martin Wilck
a successful attempt - perhaps multipathd never tried to set up the map. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> --- libmultipath/defaults.h | 1 + libmultipath/wwids.c| 110 li

[dm-devel] [PATCH v5 16/22] multipath -u : set FIND_MULTIPATHS_WAIT_UNTIL from /dev/shm

2018-04-13 Thread Martin Wilck
:minor to identify the devices in /dev/shm, and because a removed device might be replaced by a different one with the same major/minor number, add a rule to multipath.rules to remove the find_multipaths marker on remove uevents. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath

[dm-devel] [PATCH v5 10/22] libmultipath: indicate wwid failure in dm_addmap_create()

2018-04-13 Thread Martin Wilck
log level of this event to 3. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> --- libmultipath/configure.c | 35 +++ libmultipath/configure.h | 2 +- libmultipath/devmapper.c | 9 - libmult

[dm-devel] [PATCH v5 00/22] multipath path classification

2018-04-13 Thread Martin Wilck
for cancelling a running systemd timer and thus avoiding a spurious "add" event. - dropped v2 18/20-20/20. Patch 1-8 and 12, 14, 15, 19 are identical or only minimally modified wrt their counterparts in v2 (numbering changed from 11 on, though). Changes RFC->v2 not described ab

[dm-devel] [PATCH v5 11/22] multipath -u: common code path for result message

2018-04-13 Thread Martin Wilck
Print the result message in one place only. This simplifies future changes. multipath -c is also affected. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> --- multipath/main.c | 32 +++- 1 file changed, 1

[dm-devel] [PATCH v5 05/22] libmultipath: trigger change uevent on new device creation

2018-04-13 Thread Martin Wilck
change uevent to update the udev database to claim the device. Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <mwi...@suse.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 26 -- libmu

[dm-devel] [PATCH v5 14/22] multipath -u: add DM_MULTIPATH_DEVICE_PATH=2 for "maybe"

2018-04-13 Thread Martin Wilck
led, nor whitelisted in the wwids file. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/multipath/main.c b/multipath/main.c index 942caf4c..f62e18

[dm-devel] [PATCH v5 04/22] multipath -u -i: respect entries in WWIDs file

2018-04-13 Thread Martin Wilck
Ds file as multipath members, too. The rationale for this patch is to match the logic that multipathd applies by default (i.e. without "-n"). Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 19

[dm-devel] [PATCH v5 21/22] libmultipath: enable find_multipaths "smart"

2018-04-13 Thread Martin Wilck
min Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 15 --- libmultipath/dict.c| 1 + multipath/multipath.conf.5 | 13 + 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/libmult

[dm-devel] [PATCH v5 12/22] multipath -u: change output to environment/key format

2018-04-13 Thread Martin Wilck
cmd_valid are currently unused, but will be in follow-up patches. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> --- multipath/main.c | 14 -- multipath/multipath.rules | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-)

[dm-devel] [PATCH v5 01/22] Revert "multipath: ignore -i if find_multipaths is set"

2018-04-13 Thread Martin Wilck
This reverts commit ffbb886a8a16cb063d669cd76a1e656fd3ec8c4b. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/multipath/main.c b/multipath/main.c in

[dm-devel] [PATCH v5 20/22] multipath -u: test if path is busy

2018-04-13 Thread Martin Wilck
ot process. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/multipath/main.c b/multipath/main.c index 573d94f9..c69e996e 100644 --- a/multipath/main.c +++ b/

[dm-devel] [PATCH v5 15/22] libmultipath: implement find_multipaths_timeout

2018-04-13 Thread Martin Wilck
r such as network latencies or distances. find_multipaths_timeout is therefore just a "defaults" section setting. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> --- libmultipath/config.h | 1 + libmultipath/defaults.h| 2 ++ l

[dm-devel] [PATCH v5 22/22] multipath.rules: find_multipaths "smart" logic

2018-04-13 Thread Martin Wilck
pathed by then, pass it on to systemd for further processing. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> --- multipath/multipath.rules | 61 --- 1 file changed, 58 insertion

Re: [dm-devel] [PATCH 1/2] multipath-tools: move COPYING to COPYING.LESSER

2018-04-09 Thread Martin Wilck
You can then decide if you want to add it to the tree, or what else to do with it. Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.c

[dm-devel] multipath-tools 0.7.6 fossology license assessment

2018-04-09 Thread Martin Wilck
# License assessment for multipath-tools 0.7.6, git 1cb704b Author: Martin Wilck, 2018-04-10 # DISCLAIMER I AM NOT A LAWYER. THIS IS A BEST-EFFORT ASSESSMENT MADE BY A DEVELOPER. THIS DOCUMENT IS NOT INTENDED AS LEGAL ADVICE. # Statistics * LGPLv2.0 ("default license", see b

Re: [dm-devel] [PATCH 1/2] multipath-tools: move COPYING to COPYING.LESSER

2018-04-09 Thread Martin Wilck
On Mon, 2018-04-09 at 19:29 +0200, Xose Vazquez Perez wrote: > On 04/09/2018 05:57 PM, Martin Wilck wrote: > > > There are >130 files in the multipath-tools source code which don't > > have a license header. So far my *assumption* was that these files > > were > &g

Re: [dm-devel] [PATCH RFC] multipath-tools: create LICENSES dir with the text of all used licences

2018-04-10 Thread Martin Wilck
://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt > > Cc: Martin Wilck <mwi...@suse.com> > Cc: Christophe Varoqui <christophe.varo...@opensvc.com> > Cc: device-mapper development <dm-devel@redhat.com> > Signed-off-by: Xose Vazquez Perez <xose.vazq...@gmail.com&g

Re: [dm-devel] [PATCH v2 2/2] multipath-tools: link LICENSES/LGPL-2.0 to LICENSE.default

2018-04-15 Thread Martin Wilck
ath-tools source code is covered by several different licenses. Refer to the individual source files for details. Source files which do not have a license header are shipped under LGPL-2.0 (see LICENSES/LGPL-2.0). Regards Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107

Re: [dm-devel] [PATCH v4 19/20] libmultipath: enable find_multipaths "smart"

2018-04-15 Thread Martin Wilck
On Thu, 2018-04-12 at 13:47 -0500, Benjamin Marzinski wrote: > On Wed, Apr 04, 2018 at 06:16:26PM +0200, Martin Wilck wrote: > > This activates "smart" path detection. This is similar to > > "find_multipaths yes", but doesn't generally ignore single paths > &

[dm-devel] [PATCH v5 08/22] libmultipath: use const char* in open_file()

2018-04-15 Thread Martin Wilck
Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/file.c | 6 +++--- libmultipath/file.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmultipath/file.c b/libmultipath/file.c index e4951c

[dm-devel] [PATCH v5 19/22] multipath -u: don't grab devices already passed to system

2018-04-15 Thread Martin Wilck
never set, and "multipath -u" was always invoked. We want to keep this behavior. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 46 +- multipath/multipath.rules | 5 - 2 files changed, 49 insertions(+), 2

[dm-devel] [PATCH v5 07/22] libmultipath: change find_multipaths option to multi-value

2018-04-15 Thread Martin Wilck
been changed to "strict", because "no" may cause inconsistent behavior between "multipath -u" and multipathd. This is deliberately a conservative choice. The patch also updates the related man pages. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by

[dm-devel] [PATCH v5 03/22] libmultipath: should_multipath: keep existing maps

2018-04-15 Thread Martin Wilck
rzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 2 +- libmultipath/wwids.c | 12 +++- libmultipath/wwids.h | 2 +- multipathd/main.c| 2 +- 4 files changed, 14 insertions(+), 4 deletions(-)

[dm-devel] [PATCH v5 06/22] libmultipath: trigger path uevent only when necessary

2018-04-15 Thread Martin Wilck
Paths that are already classified as DM_MULTIPATH_DEVICE_PATH don't need to be retriggered. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 12 1 file changed, 12 insertions(+)

[dm-devel] [PATCH v5 13/22] multipath -u: treat failed wwids as invalid

2018-04-15 Thread Martin Wilck
If a WWID has been marked as "failed", don't treat it as "valid multipath device path" in multipath -c/-u. This is key to achieve consistency between multipathd and udev rule processing. Signed-off-by: Martin Wilck <mwi...@suse.com> Reviewed-by: Benjamin Marz

[dm-devel] [PATCH v5 17/22] multipath -u: cleanup logic

2018-04-15 Thread Martin Wilck
The CMD_VALID_PATH logic is complex and hard to read and understand. This patch cleans it up a bit (preparing for folluw-up patches). It doesn't change any logic. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 12 +++- 1 file changed, 7 insertions(+), 5 del

[dm-devel] [PATCH v5 18/22] multipath -u: quick check if path is multipathed

2018-04-15 Thread Martin Wilck
With "find_multipaths smart", we accept paths as valid if they are already part of a multipath map. This patch avoids doing a full path and device-mapper map scan for this case, speeding up "multipath -u" considerably. Signed-off-by: Martin Wilck <mwi...@suse.com> Revie

[dm-devel] [PATCH RESEND 1/2] lvm2: 69-dm-lvm-metad.rules: explicit pvscan rule

2018-04-16 Thread Martin Wilck
the two cases (mostly comments), which are practically impossible to generate with the current string subsitution approach. This patch introduces no functional change to the udev rules. Signed-off-by: Martin Wilck <mwi...@suse.com> --- udev/69-dm-lvm-metad.rules.in | 19 ++-

[dm-devel] [PATCH RESEND 2/2] lvm2: 69-dm-lvm-metad.rules: set systemd vars on "change"

2018-04-16 Thread Martin Wilck
nned over and over again. With systemd background jobs, that isn't necessary, because systemd will not restart the job as long as it's active. Signed-off-by: Martin Wilck <mwi...@suse.com> --- udev/69-dm-lvm-metad.rules.in | 56 +++ udev/Makefile.in

[dm-devel] [PATCH RESEND 0/2] LVM2: fix lvmetad udev rules for CHANGE events

2018-04-16 Thread Martin Wilck
e comments in the rules file to match the actual behavior. Substitution of multi-line comments is very hard, if not impossible, with the string substitution approach in the current Makefile. That necessitates the first patch, which introduces no functional change. Martin Wilck (2): lvm2: 69-dm-lvm-m

Re: [dm-devel] [PATCH v5 20/22] multipath -u: test if path is busy

2018-04-16 Thread Martin Wilck
On Mon, 2018-04-16 at 08:32 +0200, Hannes Reinecke wrote: > > But doesn't this cause udev to generate another event upon release? > Or is that prevented by the O_RDONLY setting? Exactly, udev triggers only on "close after write" events. Martin -- Dr. Martin Wilck <mwi...@

[dm-devel] Can we drop 'hardware_handler "1 alua"'?

2018-03-27 Thread Martin Wilck
e probing, or for kernels older than 4.3. Opinions, please. Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 1/2] multipath-tools: move COPYING to COPYING.LESSER

2018-03-28 Thread Martin Wilck
On Wed, 2018-03-28 at 22:05 +0200, Xose Vazquez Perez wrote: > On 03/28/2018 09:54 PM, Martin Wilck wrote: > > > > COPYING.LIBRARY is really a very bad name. > > > > Why? I think it expresses quite nicely what it contains. > > Too generic word. > Because i

Re: [dm-devel] [PATCH 1/2] multipath-tools: move COPYING to COPYING.LESSER

2018-03-28 Thread Martin Wilck
On Wed, 2018-03-28 at 21:40 +0200, Xose Vazquez Perez wrote: > On 03/28/2018 12:03 AM, Martin Wilck wrote: > > > > > IMO you should only call it "COPYING.LESSER" if it's really the > > lesser > > GPL (aka LGPLv2.1). > > LESSER is just the famil

Re: [dm-devel] [PATCH v2 17/20] multipath.rules: find_multipaths "smart" logic

2018-03-29 Thread Martin Wilck
yourself in a > middle > of an event storm ... Thanks for mentioning that. Udev listens for inotify events for "close after write". We will do the test with O_RDONLY|O_EXCL, so no event should be generated. Moreover, events should only occur if udev is watching the device, which shou

Re: [dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-26 Thread Martin Wilck
f the code, so that's for others to decide. Cheers, Martin (*) Caveat: code which has been copied from kernel sources (list.h?, alua code?, ... ?) would be under "GPLv2 only", and changing that would require consent of the original copyright holders, which might be difficult to obtain. -- Dr. M

Re: [dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-26 Thread Martin Wilck
On Mon, 2018-03-26 at 14:36 +0200, Martin Wilck wrote: > On Mon, 2018-03-26 at 13:04 +0200, Hannes Reinecke wrote: > > > > Well, as I'm the one responsible for adding 'sysfs.c' and > > 'uevent.c' > > to > > multipath-tools I should allowed to change the license

Re: [dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-26 Thread Martin Wilck
On Mon, 2018-03-26 at 14:36 +0200, Martin Wilck wrote: > > The key question is whether we need *L*GPL at all. We only do if we > want to allow prioprietary code to link with our code. Because > libmultipath is no "library" intended for general use, rather a set >

Re: [dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-26 Thread Martin Wilck
ternal users. If the intention is to make libmpathpersist usable by proprietary code, you'd need to decouple it from libmultipath by using cli commands. If there's no such intention, all we need to do is clarify the license situation. Regards Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel

[dm-devel] [PATCH v3 11/20] multipath -u: common code path for result message

2018-04-02 Thread Martin Wilck
Print the result message in one place only. This simplifies future changes. multipath -c is also affected. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/multipath/ma

[dm-devel] [PATCH v3 07/20] libmultipath: change find_multipaths option to multi-value

2018-04-02 Thread Martin Wilck
been changed to "strict", because "no" may cause inconsistent behavior between "multipath -u" and multipathd. This is deliberately a conservative choice. The patch also updates the related man pages. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by

[dm-devel] [PATCH v3 15/20] libmultipath: implement find_multipaths_timeout

2018-04-02 Thread Martin Wilck
r such as network latencies or distances. find_multipaths_timeout is therefore just a "defaults" section setting. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/config.h | 1 + libmultipath/defaults.h| 2 ++ libmultipath/dict.c| 6 ++ libmultipath/pr

[dm-devel] [PATCH v3 13/20] multipath -u: treat failed wwids as invalid

2018-04-02 Thread Martin Wilck
If a WWID has been marked as "failed", don't treat it as "valid multipath device path" in multipath -c/-u. This is key to achieve consistency between multipathd and udev rule processing. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 8 ++-- 1

[dm-devel] [PATCH v3 10/20] libmultipath: indicate wwid failure in dm_addmap_create()

2018-04-02 Thread Martin Wilck
log level of this event to 3. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 37 - libmultipath/configure.h | 2 +- libmultipath/devmapper.c | 9 - libmultipath/structs.h | 1 + multipathd/main.c| 2 +-

[dm-devel] [PATCH v3 18/20] multipath -u: quick check if path is multipathed

2018-04-02 Thread Martin Wilck
With "find_multipaths smart", we accept paths as valid if they are already part of a multipath map. This patch avoids doing a full path and device-mapper map scan for this case, speeding up "multipath -u" considerably. Signed-off-by: Martin Wilck <mwi...@suse.com> ---

[dm-devel] [PATCH v3 09/20] libmultipath: functions to indicate mapping failure in /dev/shm

2018-04-02 Thread Martin Wilck
of a file under /dev/shm/multipath/failed_wwids. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/defaults.h | 1 + libmultipath/wwids.c| 110 libmultipath/wwids.h| 11 + 3 files changed, 122 insertions(+) diff --gi

[dm-devel] [PATCH v3 02/20] Revert "multipathd: imply -n if find_multipaths is set"

2018-04-02 Thread Martin Wilck
This reverts commit 64e27ec066a001012f44550f095c93443e91d845. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipathd/main.c | 4 1 file changed, 4 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c i

[dm-devel] [PATCH v3 06/20] libmultipath: trigger path uevent only when necessary

2018-04-02 Thread Martin Wilck
Paths that are already classified as DM_MULTIPATH_DEVICE_PATH don't need to be retriggered. Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 12 1 file changed, 12 insertions(+)

[dm-devel] [PATCH v3 04/20] multipath -u -i: respect entries in WWIDs file

2018-04-02 Thread Martin Wilck
Ds file as multipath members, too. The rationale for this patch is to match the logic that multipathd applies by default (i.e. without "-n"). Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 19

[dm-devel] [PATCH v3 19/20] libmultipath: enable find_multipaths "smart"

2018-04-02 Thread Martin Wilck
tain time, the paths are re-added to the system as non-multipath. This needs support by the udev rules, to be added in a follow-up patch. If a multipath map is successfully successfully created, and paths are in waiting state, trigger path uevents to update their status. Signed-off-by: Martin Wi

[dm-devel] [PATCH v3 00/20] multipath path classification

2018-04-02 Thread Martin Wilck
d thus avoiding a spurious "add" event. - dropped v2 18/20-20/20. Patch 1-8 and 12, 14, 15, 19 are identical or only minimally modified wrt their counterparts in v2 (numbering changed from 11 on, though). Changes RFC->v2 not described above: - 03/17 "should_multipath: keep existing

[dm-devel] [PATCH v3 08/20] libmultipath: use const char* in open_file()

2018-04-02 Thread Martin Wilck
Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/file.c | 6 +++--- libmultipath/file.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmultipath/file.c b/libmultipath/file.c index e495

[dm-devel] [PATCH v3 17/20] multipath -u: test if path is busy

2018-04-02 Thread Martin Wilck
ot process. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/multipath/main.c b/multipath/main.c index d09f117..392d5f0 100644 --- a/multipath/main.c +++ b/multipath/main.c @@

Re: [dm-devel] [PATCH 1/2] libmultipath: hwhandler auto-detection for ALUA

2018-04-03 Thread Martin Wilck
On Tue, 2018-04-03 at 15:31 -0500, Benjamin Marzinski wrote: > On Tue, Mar 27, 2018 at 11:50:52PM +0200, Martin Wilck wrote: > > If the hardware handler isn't explicitly set, infer ALUA support > > from the pp->tpgs attribute. Likewise, if ALUA is selected, but > > not s

Re: [dm-devel] Can we drop 'hardware_handler "1 alua"'?

2018-03-27 Thread Martin Wilck
On Tue, 2018-03-27 at 17:46 +0200, Xose Vazquez Perez wrote: > On 03/27/2018 10:56 AM, Martin Wilck wrote: > > > hwtable.c has multiple entries that set 'hardware_handler "1 alua"' > > explicitly. But the kernel has been auto-attaching the ALUA > > hwhandler &g

Re: [dm-devel] [PATCH v2 17/20] multipath.rules: find_multipaths "smart" logic

2018-03-28 Thread Martin Wilck
On Tue, 2018-03-27 at 18:07 -0500, Benjamin Marzinski wrote: > On Tue, Mar 27, 2018 at 11:34:00PM +0200, Martin Wilck wrote: > > > > The following happens: multipath -u temporarily claims the device. > > When > > multipathd starts, it fails to set up the map, s

Re: [dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-28 Thread Martin Wilck
s paranoid and exaggerated, but I've heard exactly arguments like this in discussions about proprietary software using FLOSS. It's the kind of thing Black Duck and similar companies make money with. Regards Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH,

Re: [dm-devel] [PATCH v2 10/20] libmultipath: indicate wwid failure in dm_addmap_create()

2018-03-26 Thread Martin Wilck
On Mon, 2018-03-26 at 12:52 -0500, Benjamin Marzinski wrote: > On Mon, Mar 19, 2018 at 04:01:45PM +0100, Martin Wilck wrote: > > dm_addmap_create() is where we actually try to set up a new > > multipath map. Depending on the result, mark the wwid as > > failed (or not), and

Re: [dm-devel] [PATCH v2 11/20] libmultipath: don't try to set up failed wwids again

2018-03-26 Thread Martin Wilck
On Mon, 2018-03-26 at 13:47 -0500, Benjamin Marzinski wrote: > On Mon, Mar 19, 2018 at 04:01:46PM +0100, Martin Wilck wrote: > > Once setting up a map has failed, don't try to set it up again. > > This applies to "multipathd reconfigure" and even multipathd > > rest

Re: [dm-devel] [PATCH 1/2] multipath-tools: move COPYING to COPYING.LESSER

2018-03-27 Thread Martin Wilck
om COPYING > rename to COPYING.LESSER IMO you should only call it "COPYING.LESSER" if it's really the lesser GPL (aka LGPLv2.1). Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürn

Re: [dm-devel] [PATCH 2/2] multipath-tools: add GPLv2 as COPYING

2018-03-27 Thread Martin Wilck
ned-off-by: Xose Vazquez Perez <xose.vazq...@gmail.com> Do you plan to add a README.COPYING or similar explaining which license applies to what part of the code? Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smit

[dm-devel] [PATCH 1/2] libmultipath: hwhandler auto-detection for ALUA

2018-03-27 Thread Martin Wilck
If the hardware handler isn't explicitly set, infer ALUA support from the pp->tpgs attribute. Likewise, if ALUA is selected, but not supported by the hardware, fall back to no hardware handler. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/propsel.c | 19 +

[dm-devel] [PATCH 2/2] libmultipath/propsel: (re)use static const vars for origin

2018-03-27 Thread Martin Wilck
Define a set of "origin" strings and reuse them throughout the code. That avoids duplication and makes it easier to verify that we use consistent messages. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/propsel.c | 170 -

Re: [dm-devel] multipath-tools licenses (was Re: [PATCH] multipath-tools: replace FSF address with a www pointer)

2018-03-27 Thread Martin Wilck
On Tue, 2018-03-27 at 23:42 +0200, Xose Vazquez Perez wrote: > On 03/26/2018 02:36 PM, Martin Wilck wrote: > > > It'd be a good idea to upgrade generally from "Library GPL v2" at > > least > > to LGPLv2.1. That shouldn't be a problem, as the only major > >

Re: [dm-devel] [PATCH 1/2] libmultipath: hwhandler auto-detection for ALUA

2018-04-04 Thread Martin Wilck
On Tue, 2018-04-03 at 16:29 -0500, Benjamin Marzinski wrote: > On Tue, Apr 03, 2018 at 10:53:29PM +0200, Martin Wilck wrote: > > On Tue, 2018-04-03 at 15:31 -0500, Benjamin Marzinski wrote: > > > On Tue, Mar 27, 2018 at 11:50:52PM +0200, Martin Wilck wrote: > > > >

Re: [dm-devel] [PATCH 3/3] multipathd: stop waiter in __setup_multipath

2018-03-19 Thread Martin Wilck
> simply relied on the waiter thread to notice and stop itself. Now, > when > called by another thread, it explicitly stops the waiter thread. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <mwi...@redhat.com> - Dr. Martin Wilck <

Re: [dm-devel] [PATCH 03/12] libmultipath: set dm_conf_verbosity

2018-03-19 Thread Martin Wilck
On Wed, 2018-03-14 at 12:46 -0500, Benjamin Marzinski wrote: > dm_conf_verbosity was created to keep dm_write_log from needing > access to the multipath config. However it never was set. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <

Re: [dm-devel] [PATCH 06/12] multipathd: use nanosleep for strict timing

2018-03-19 Thread Martin Wilck
't need the log message, because just means one of the expected signals arrived. As stated earlier, I'd prefer a kernel interval timer for strict_timing. I'm unsure why it hasn't been done that way in the first place. Anyway, that can be discussed later, therefore: Reviewed-by: Martin Wilck <mwi...@

Re: [dm-devel] [PATCH 11/12] multipathd: add new polling dmevents waiter thread

2018-03-19 Thread Martin Wilck
version, and defaults to using the polling code if > device-mapper supports it. This can be overridden by running > multipathd > with "-w", to force it to use the old event waiting code. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Reviewed-by: Martin Wi

Re: [dm-devel] [PATCH 2/3] multipathd: move __setup_multipath to multipathd

2018-03-19 Thread Martin Wilck
tipathd. > None of these functions were changed, only copied. > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> One day we may need to split up multipathd/main.c a bit... Acked-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2

Re: [dm-devel] [PATCH 04/12] multipathd: log thread cleanup

2018-03-19 Thread Martin Wilck
re > being used outside of log_thread.c, was to reset the log. This code > should never be run if the log_thread isn't running, so it makes more > sense to live inside of log_thread.c > > Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> > --- Reviewed-by: Martin W

Re: [dm-devel] [PATCH 01/12] Unit tests for basenamecpy

2018-03-19 Thread Martin Wilck
st)), 0); > +} Another one: "basename /" yields "/" in the shell, so does "basename ///"). I don't insist that basenamecpy behaves 100% identical as "basename", but I reckon if expectations are different, we should explain why. Regards, Martin -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 05/12] libmultipath: fix log_pthread processing

2018-03-19 Thread Martin Wilck
arzinski <bmarz...@redhat.com> Reviewed-by: Martin Wilck <mwi...@suse.com> -- Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list dm-devel@redhat.c

[dm-devel] [PATCH v2 04/20] multipath -u -i: respect entries in WWIDs file

2018-03-19 Thread Martin Wilck
Ds file as multipath members, too. The rationale for this patch is to match the logic that multipathd applies by default (i.e. without "-n"). Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions

[dm-devel] [PATCH v2 00/20] multipath path classification

2018-03-19 Thread Martin Wilck
ev-friendly KEY="value" format. Changes wrt RFC series not described above: - 03/17 "should_multipath: keep existing maps": don't check for empty pathvec; rather check if the mapping actually exists in device-mapper (Ben Marzinski) - added three minor patches at the end changing l

[dm-devel] [PATCH v2 01/20] Revert "multipath: ignore -i if find_multipaths is set"

2018-03-19 Thread Martin Wilck
This reverts commit ffbb886a8a16cb063d669cd76a1e656fd3ec8c4b. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/multipath/main.c b/multipath/main.c index 716203eab56c..20f46acd924a 100644 --- a/multipath/main.c

[dm-devel] [PATCH v2 06/20] libmultipath: trigger path uevent only when necessary

2018-03-19 Thread Martin Wilck
Paths that are already classified as DM_MULTIPATH_DEVICE_PATH don't need to be retriggered. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 12 1 file changed, 12 insertions(+) diff --git a/libmultipath/configure.c b/libmultipath/configure.c

[dm-devel] [PATCH v2 02/20] Revert "multipathd: imply -n if find_multipaths is set"

2018-03-19 Thread Martin Wilck
This reverts commit 64e27ec066a001012f44550f095c93443e91d845. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipathd/main.c | 4 1 file changed, 4 deletions(-) diff --git a/multipathd/main.c b/multipathd/main.c index 3ae04422a123..0435133fadfb 100644 --- a/multipathd/main.c

[dm-devel] [PATCH v2 07/20] libmultipath: change find_multipaths option to multi-value

2018-03-19 Thread Martin Wilck
been changed to "strict", because "no" may cause inconsistent behavior between "multipath -u" and multipathd. This is deliberately a conservative choice. The patch also updates the related man pages. Signed-off-by: Martin Wilck <

[dm-devel] [PATCH v2 08/20] libmultipath: use const char* in open_file()

2018-03-19 Thread Martin Wilck
Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/file.c | 6 +++--- libmultipath/file.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libmultipath/file.c b/libmultipath/file.c index e4951c92eb67..d5165ec6709a 100644 --- a/libmultipath/file.c

[dm-devel] [PATCH v2 03/20] libmultipath: should_multipath: keep existing maps

2018-03-19 Thread Martin Wilck
with find_multipaths "yes" and without the "-n" option to multipathd, if a path is already multipathed, keep it. The same logic is applied by "multipath -u -i". To do this, we need to add a "mpvec" parameter to should_multipath(). Signed-off-by: Martin W

[dm-devel] [PATCH v2 13/20] multipath -u: change output to environment/key format

2018-03-19 Thread Martin Wilck
... instead of free format. This provides more flexibility for udev rule processing for the future. Adapt code in multipath.rules. The exit status remains as usual. This affects "multipath -c", too. Signed-off-by: Martin Wilck <mwi...@suse.com> --- multipath/main

[dm-devel] [PATCH v2 09/20] libmultipath: functions to indicate mapping failure in /dev/shm

2018-03-19 Thread Martin Wilck
of a file under /dev/shm/multipath/failed_wwids. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/wwids.c | 102 +++ libmultipath/wwids.h | 4 +- 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/libmultipath/wwids.

[dm-devel] [PATCH v2 11/20] libmultipath: don't try to set up failed wwids again

2018-03-19 Thread Martin Wilck
t;failed" again. Inofficially, it's also possible to manually remove a failed marker under /dev/shm/multipath/failed_wwids and run "multipathd reconfigure". Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 5 +++-- libmultipath/configure.h | 3

[dm-devel] [PATCH v2 05/20] libmultipath: trigger change uevent on new device creation

2018-03-19 Thread Martin Wilck
change uevent to update the udev database to claim the device. Signed-off-by: Benjamin Marzinski <bmarz...@redhat.com> Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 26 -- libmultipath/configure.h | 1 + libmultipath/wwids.c

[dm-devel] [PATCH v2 10/20] libmultipath: indicate wwid failure in dm_addmap_create()

2018-03-19 Thread Martin Wilck
log level of this event to 3. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/configure.c | 37 - libmultipath/configure.h | 2 +- libmultipath/devmapper.c | 8 +++- libmultipath/structs.h | 1 + multipathd/main.c| 2 +-

[dm-devel] [PATCH v2 15/20] libmultipath: implement find_multipaths_timeout

2018-03-19 Thread Martin Wilck
r such as network latencies or distances. find_multipaths_timeout is therefore just a "defaults" section setting. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/config.h | 1 + libmultipath/defaults.h| 2 ++ libmultipath/dict.c| 6 ++ libmultipath/pr

[dm-devel] [PATCH v2 19/20] libmultipath: decrease log level of uevent filter/merge messages

2018-03-19 Thread Martin Wilck
There should be no need to log these at -v2. The messages are informational. Signed-off-by: Martin Wilck <mwi...@suse.com> --- libmultipath/uevent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/uevent.c b/libmultipath/uevent.c index c6a9e8

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