Re: [dm-devel] [PATCH 09/10] add disable_changed_wwids option

2017-02-28 Thread Zhangguanghui
Hi, everyone In my testing in the use of 3Par storage device, when a LUN changes LUN number multipathd can not receive the uevent and can not disable access to the device. but for HP 6300 storage device, it can receive the uevent and disable access to the device. So I think 3Par

[dm-devel] [PATCH 19/33] libmultipath: setup_features: log msg if queue_if_no_path is ignored

2017-02-28 Thread Martin Wilck
From: Martin Wilck Signed-off-by: Martin Wilck --- libmultipath/propsel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c index bba8194c..0c499339 100644 --- a/libmultipath/propsel.c +++

[dm-devel] [PATCH 10/33] multipath: avoid crash when using modified configuration

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke Occasionally multipath would crash when using a modified configuration. Signed-off-by: Hannes Reinecke --- libmultipath/discovery.c | 2 +- multipath/main.c | 10 -- 2 files changed, 5 insertions(+), 7 deletions(-) diff

[dm-devel] [PATCH 15/33] libmultipath: move suspend logic to _dm_flush_map

2017-02-28 Thread Martin Wilck
From: Martin Wilck The function dm_suspend_and_flush() introduced in 9a4ff93 tries to remove child maps (partitions) after suspending the mpath device. This may lock up if removing the partitions requires I/O. It's better to use the following sequence of actions: 1) clear

[dm-devel] [PATCH 01/33] multipathd.service: fixup Wants= and Before= statements

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke With the latest LVM2 update we now have the 'lvm2-lvmetad.service'. Also we need to specify 'blk-availability.service' in the 'Before=' statement, as just adding it to 'Wants=' assumes the multipathd service should be running after the blk-availability

[dm-devel] [PATCH 33/33] Make libdmmp build optional

2017-02-28 Thread Martin Wilck
Signed-off-by: Martin Wilck --- Makefile | 6 +- Makefile.inc | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9f8bf775..cfee0d07 100644 --- a/Makefile +++ b/Makefile @@ -30,12 +30,16 @@ BUILDDIRS = \

[dm-devel] [PATCH 18/33] multipathd: use weaker "force_reload" at startup

2017-02-28 Thread Martin Wilck
From: Martin Wilck "force_reload" has originally been created to support multipath -r (admin triggered reload). multipathd also uses this parameter in DAEMON_CONFIGURE state, too. But this is causes unnecessary device-mapper ioctls when multipathd is first started, if existing

[dm-devel] [PATCH 07/33] libmultipath: fall back to search paths by devt

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke When removing path the device might already be gone from sysfs, so we cannot lookup the device name. However, we still should have the path vector available, so we should be trying to look it up by using the device number. Signed-off-by: Hannes Reinecke

[dm-devel] [PATCH 05/33] Invalid error code when using multipathd CLI

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke When calling the multipathd CLI we're getting the message error -1 receiving packet instead of the actual error number. Problem is a confusion about the return values between libmpathcmd and uxsock.c. uxsock.c is assuming a negative return value to be the

[dm-devel] [PATCH 09/33] multipathd: Set CLI timeout correctly

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke When calling 'multipathd cmd' the CLI timeout isn't set correctly; calling "multipathd -k'cmd'" uses the correct timeout. And the default timeout should be increased to 4 seconds to ensure multipath runs correctly on large installations. Signed-off-by:

[dm-devel] [PATCH 04/33] multipath: do not check daemon from udev rules

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke As stated previously, multipathd needs to start after udev trigger has run as otherwise it won't be able to find any devices. However, this also means that during udevadm trigger the daemon wouldn't run, and consequently the check in the udev rules will always

[dm-devel] [PATCH 28/33] libmultipath: coalesce_paths: trigger uevent if nothing done

2017-02-28 Thread Martin Wilck
From: Martin Wilck The previous patches skip RELOAD actions if there's nothing to be done. I found a corner case where this may lead to imporperly initialized device nodes (in my case a by-label link hadn't been reset to the partition on the multipath device by udev). Triggering

[dm-devel] [PATCH 02/33] multipathd: start daemon after udev trigger

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke As multipath now relies on udev for device enumeration it needs to be started after udev trigger has finished sending all events. Otherwise the daemon will not find any devices during startup (as udev trigger hasn't been called yet and the udev database is

[dm-devel] [PATCH 24/33] libmultipath: select_action: check special features separately

2017-02-28 Thread Martin Wilck
From: Martin Wilck The features queue_if_no_path and retain_attached_hw_handler are treated separately in libmultipath. Compare these features by looking at the respective flags, and ignore them when comparing the "features" string. assemble_map() does the ssame thing when

[dm-devel] [PATCH 00/33] multipath-tools fixes from SUSE

2017-02-28 Thread Martin Wilck
As announced previously, here comes a collection of multipath-tools patches that SUSE is using for SLES12 SP2. The whole series can be roughly broken down into the following logical parts. Details can be found in the indvidual patches. A) Modified boot sequence (01, 02, 04): Under SLES12, the

[dm-devel] [PATCH 30/33] tur: Add pthread_testcancel()

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke When the ioctl returns we need to check if a cancellation has been requested; otherwise we'd be re-setting the state and overwrite any pending values. Signed-off-by: Hannes Reinecke --- libmultipath/checkers/tur.c | 1 + 1 file changed, 1

[dm-devel] [PATCH 06/33] multipathd: set timeout for CLI commands correctly

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke The CLI command timeout wasn't set correctly for CLI commands, causing it to timeout prematurely before the CLI response could be received. Signed-off-by: Hannes Reinecke --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1

[dm-devel] [PATCH 17/33] multipathd: imply -n if find_multipaths is set

2017-02-28 Thread Martin Wilck
Automatic detection of new devices with find_multipaths doesn't work correctly currently. Therefore, for now, imply ignore_new_devs if find_multipaths is seen. Signed-off-by: Martin Wilck --- multipathd/main.c | 4 1 file changed, 4 insertions(+) diff --git

[dm-devel] [PATCH 21/33] libmultipath: setup_feature: handle "retain_attached_hw_handler"

2017-02-28 Thread Martin Wilck
From: Martin Wilck Signed-off-by: Martin Wilck --- libmultipath/structs.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libmultipath/structs.c b/libmultipath/structs.c index c2565239..e225f8b4 100644 --- a/libmultipath/structs.c +++

[dm-devel] [PATCH 13/33] libmultipath: use existing alias from bindings file

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke If the bindings file has been edited by hand not all entries conform to the user_friendly_prefix setting. So if we don't find a matching alias we need to check if the wwid is set to a different alias; if so we need to use that. Otherwise we'll end up with

[dm-devel] [PATCH 11/33] multipathd: issue systemd READY after initial configuration

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke We should be issueing systemd READY only after the initial configuration has been completed, otherwise systemd might continue while the multipath devices are not setup up properly. Signed-off-by: Hannes Reinecke --- multipathd/main.c | 11

[dm-devel] [PATCH 25/33] libmultipath: sysfs_attr_set_value: use const char*

2017-02-28 Thread Martin Wilck
From: Martin Wilck The value argument in syfs_attr_set_value should be const char*. Signed-off-by: Martin Wilck --- libmultipath/sysfs.c | 2 +- libmultipath/sysfs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/sysfs.c

[dm-devel] [PATCH 32/33] libmultipath/checkers: make RADOS checker optional

2017-02-28 Thread Martin Wilck
Some distros lack the rados header files. Use "make ENABLE_RADOS=0" on such distributions to build multipath-tools in such cases. The default (to enable RADOS support) remains unchanged. Signed-off-by: Martin Wilck --- Makefile.inc | 3 +++

[dm-devel] [PATCH 29/33] kpartx: sanitize delete partitions

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke kpartx has a rather braindead method for deleting partitions; generating 'possible' partition names and trying to remove all of them. With this patch kpartx looks at the device-mapper devices on top of the referenced device, and removes them if they found to

[dm-devel] [PATCH 27/33] libmultipath: differentiate ACT_NOTHING and ACT_IMPOSSIBLE

2017-02-28 Thread Martin Wilck
From: Martin Wilck select_action uses ACT_NOTHING for two different cases, 1) if changes can't be applied for some reason, and 2) if nothing needs to be done. Introduce ACT_IMPOSSIBLE for case 1). Signed-off-by: Martin Wilck --- libmultipath/configure.c | 7

[dm-devel] [PATCH 20/33] libmultipath: setup_feature: print log msg if no_path_retry cant be set

2017-02-28 Thread Martin Wilck
From: Martin Wilck Signed-off-by: Martin Wilck --- libmultipath/structs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libmultipath/structs.c b/libmultipath/structs.c index 4419510d..c2565239 100644 --- a/libmultipath/structs.c +++

[dm-devel] [PATCH 26/33] libmultipath: reload map if not known to udev

2017-02-28 Thread Martin Wilck
From: Martin Wilck The previous changes skip map reload if the existing kernel state appears correct. Sometimes, boot time race conditions may cause a device to be correctly set up in the kernel but not in udev. Check this condition, and reload map in this case. Signed-off-by:

[dm-devel] [PATCH 03/33] Add support for "multipath=off" and "nompath" on kernel cmdline

2017-02-28 Thread Martin Wilck
From: Martin Wilck Add support for disabling multipathd startup from the kernel command line. This is useful for debugging purposes. Signed-off-by: Martin Wilck --- multipath/multipath.rules | 5 + multipathd/multipathd.service | 2 ++ 2 files changed,

[dm-devel] [PATCH 23/33] libmultipath: disassemble_map: treat minio like assemble_map does

2017-02-28 Thread Martin Wilck
From: Martin Wilck Rather than using 0 for everything except round-robin, read back the actual minio value from DM. Signed-off-by: Martin Wilck --- libmultipath/dmparser.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[dm-devel] [PATCH 22/33] libmultipath: disassemble_map: skip no_path_retry check

2017-02-28 Thread Martin Wilck
From: Martin Wilck mpp->no_path_retry is already checked in setup_feature() itself, no need to do it here as well. This allows using setup_feature() for other features except queue_if_no_path. Signed-off-by: Martin Wilck --- libmultipath/dmparser.c | 5 +

[dm-devel] [PATCH 31/33] multipathd: fixup check for new path states

2017-02-28 Thread Martin Wilck
From: Hannes Reinecke When testing for new path states we should be making sure to always using the same path state mask. Otherwise we'll miss out any states. Signed-off-by: Hannes Reinecke --- multipathd/main.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [dm-devel] [dm:for-next 23/25] drivers/md/dm-raid.c:3469:3: error: 'else' without a previous 'if'

2017-02-28 Thread Mike Snitzer
wow, oops, fixed On Tue, Feb 28 2017 at 4:25pm -0500, kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git > for-next > head: b08c607678274dd6e0245c6e2b77ea0692f03b00 > commit:

[dm-devel] [dm:for-next 23/25] drivers/md/dm-raid.c:3469:3: error: 'else' without a previous 'if'

2017-02-28 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next head: b08c607678274dd6e0245c6e2b77ea0692f03b00 commit: a482ed76823e7d2ab358ae7f140c5866c837e2ab [23/25] dm raid: fix raid "check" regression due to improper cleanup in raid_message() config:

Re: [dm-devel] [PATCH] multipath-tools: improve processing efficiency for addition and deletion of multipath devices

2017-02-28 Thread Christophe Varoqui
Applied. Thanks. On Tue, Feb 28, 2017 at 8:05 AM, wrote: > From: "tang.junhui" > > This patch used to improve processing efficiency for addition and deletion > of multipath devices. > > This patch is tested pass by ZTE multipath automatic testing