[dm-devel] [PATCH 05/10] mpath: don't wait for udev if all paths are down

2016-10-28 Thread Benjamin Marzinski
Normally multipath waits for udev to create a device before adding more paths, which could trigger a reload. But, if the first path discovered is not usable, you should add the next path right away. Signed-off-by: Benjamin Marzinski --- multipathd/main.c | 5 - 1 file changed, 4 insertions(+

[dm-devel] [PATCH 07/10] recover from errors in multipathd startup

2016-10-28 Thread Benjamin Marzinski
When multipathd does it's initial configuration during startup, it fails the daemon for many errors that it would simply recover from if they occured when adding paths or maps later. It should recover from these errors during startup as well. Also, if multipathd hits a nonrecoverable error, it sh

[dm-devel] [PATCH 01/10] libmultipath: add skip_kpartx option

2016-10-28 Thread Benjamin Marzinski
This option gives multipath the ability to stop kpartx from running. The previous idea, the "no_partitions" feature, was not accepted in the upstream kernel. This method uses one of the dm cookie subsystem flags DM_SUBSYSTEM_UDEV_FLAG1, which can be checked by udev to skip running kpartx when proce

[dm-devel] [PATCH 08/10] fix INIT_REQUESTED_UDEV code

2016-10-28 Thread Benjamin Marzinski
uev_update_path was not checking pp->initialized to see if multipathd had requested that the path be reinitialized unless the path's read-only state had changed. This kept the reinitialization code from running in most cases where it was supposed to. This patch reorders the function to move that c

[dm-devel] [PATCH 06/10] multipath: set cookie before using it.

2016-10-28 Thread Benjamin Marzinski
dm_task_set_cookie() expects the cookie to be initialized when it is called, but dm_rename() didn't initialized it, causing renames to fail some of the time. Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmult

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

2016-10-28 Thread Benjamin Marzinski
If a LUN on a storage device gets remapped while in-use by multipath, it's possible that the multipath device will continue writing to this new LUN, causing corruption. This is not multipath's fault (users should go remapping in-use LUNs), but it's possible for multipath to detect this and disable

[dm-devel] [PATCH 03/10] do not allow in-use path to change wwid

2016-10-28 Thread Benjamin Marzinski
When a path is part of a multipath device, it must not change it's wwid. If it can, when multipathd is reconfigured, you can end up with two multipath devices owning the same path, eventually leading to a crash. Signed-off-by: Benjamin Marzinski --- libmultipath/dmparser.c | 8 1 file c

[dm-devel] [PATCH] block: disallow changing max_sectors_kb on a request stacking device

2016-10-28 Thread Mike Snitzer
Otherwise users can easily shoot themselves in the foot by creating the situation where the top-level stacked device (e.g. DM multipath) has a larger max_sectors_kb than the underlying device(s). Which will certainly lead to IO errors due to the "over max size limit" check in blk_cloned_rq_check_l

Re: [dm-devel] [PATCH] add_feature: coredump

2016-10-28 Thread Bart Van Assche
On 10/13/2016 07:08 PM, huang.we...@zte.com.cn wrote: From: "wei.huang" Problem: when we configure device like vendor is COMPELNT in multipath.conf, multipathd will be coredump. Reasons: some vonders are not configured features in default_hw. In add_feature, strstr's first parameter *f maybe

[dm-devel] [PATCH] dm: do not assign error to md->kworker_task

2016-10-28 Thread Tahsin Erdogan
cleanup_mapped_device() calls kthread_stop() if kworker_task is non-NULL. Currently the assigned value could be a valid task struct or an error code. Do not assign in case of error. Example failure when kthread_run() returns -ENOMEM: [ 22.255939] BUG: unable to handle kernel NULL pointer derefe

[dm-devel] [PATCH] hwe_regmatch: match error

2016-10-28 Thread huang . wei56
From: "wei.huang" Problem: when we configure a device like vendor, product, revision all null in multipath.conf, hwe_regmatch always return 0. Reasons: \!hwe2->vendor, \!hwe2->product and \!hwe2->revision are all true. Signed-off-by: wei.huang --- libmultipath/config.c | 3 ++- 1 file change

[dm-devel] [PATCH] Remove duplicated code in mpath_alloc_prin_response()

2016-10-28 Thread ding . yemin
From: "ding.yemin" Remove duplicated code in mpath_alloc_prin_response(). Signed-off-by: ding.yemin --- libmpathpersist/mpath_persist.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c index 7

[dm-devel] [PATCH] multipathd/main.c: delete redundant judgment before LOG_MSG()

2016-10-28 Thread li . minghui7
From: "li.minghui" Problem:the LOG_MSG() doesn't note the path info "path offline" when the path is in offline with the pp->offline = 1. Reasons:There is no need to judge the strlen(b) again before calling LOG_MSG(a, b) because there exists the judgmnet of strlen(b) in defination of LOG_MSG(a,b)

[dm-devel] [PATCH] add_feature: coredump

2016-10-28 Thread huang . wei56
From: "wei.huang" Problem: when we configure device like vendor is COMPELNT in multipath.conf, multipathd will be coredump. Reasons: some vonders are not configured features in default_hw. In add_feature, strstr's first parameter *f maybe null. Signed-off-by: wei.huang --- libmultipath/stru

[dm-devel] [PATCH] Add break for switch-case in prin_do_scsi_ioctl().

2016-10-28 Thread ding . yemin
From: "ding.yemin" Add break for switch-case in prin_do_scsi_ioctl(). Signed-off-by: ding.yemin --- libmpathpersist/mpath_pr_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmpathpersist/mpath_pr_ioctl.c b/libmpathpersist/mpath_pr_ioctl.c index 8b9ac3d..ffe7468 100644 --- a/libmp

Re: [dm-devel] [PATCH] multipathd: fix issue in 'map $map getprstatus' reply

2016-10-28 Thread peng . liang5
Hello Bart, I can understand your concern. It may be some other error not just memory error if asprintf() fails, so returning ENOMEM is not accurate. Additionally, you still need to verify the numeric value of ETIMEDOUT because cli_getprstatus() returning 1 in the other code as follows.

[dm-devel] [PATCH] Add break for switch-case in prin_do_scsi_ioctl().

2016-10-28 Thread ding . yemin
From: "ding.yemin" Add break for switch-case in prin_do_scsi_ioctl(). --- libmpathpersist/mpath_pr_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libmpathpersist/mpath_pr_ioctl.c b/libmpathpersist/mpath_pr_ioctl.c index 8b9ac3d..ffe7468 100644 --- a/libmpathpersist/mpath_pr_ioctl.c

Re: [dm-devel] REQ_OP for zeroing, was Re: [PATCH 1/4] brd: handle misaligned discard

2016-10-28 Thread Christoph Hellwig
[adding Chaitanya to Cc] On Fri, Oct 28, 2016 at 07:43:41AM -0400, Mikulas Patocka wrote: > We could detect if the REQ_OP_WRITE_SAME command contains all zeroes and > if it does, turn it into "Write Zeroes" or TRIM command (if the device > guarantees zeroing on trim). If it doesn't contain all z

Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-28 Thread Mikulas Patocka
On Wed, 26 Oct 2016, Bart Van Assche wrote: > On 10/26/2016 02:46 PM, Mikulas Patocka wrote: > > I don't like the idea of complicating the code by turning discards into > > writes. > > That's not what my patch series does. The only writes added by my patch series > are those for the non-aligned