[dm-devel] [PATCH 6/6] multipath: deal with delegation failures correctly

2020-07-27 Thread Benjamin Marzinski
delegate_to_multipathd() was returning success, even if the multipathd command failed. Also, if the command was set to fail with NOT_DELEGATED, it shouldn't print any errors, since multipath will try to issue to command itself. Fixes: "multipath: delegate flushing maps to multipathd" Signed-off-by

[dm-devel] [PATCH 5/6] libmultipath: deal with flushing no maps

2020-07-27 Thread Benjamin Marzinski
dm_flush_maps() was failing if there were no device-mapper devices at all, instead of returning success, since there is nothing to do. Fixes: "libmultipath: make dm_flush_maps only return 0 on success" Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 2 +- 1 file changed, 1 inser

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

2020-07-27 Thread Benjamin Marzinski
Patches 0003 & 0004 fix an issue that I've seen with paths whose checker takes too long when multipathd is starting up and creating devices. The others are minor build fixes or small cleanups to my previous patchset. Benjamin Marzinski (6): Makefile.inc: trim extra information from systemd vers

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

2020-07-27 Thread Benjamin Marzinski
Signed-off-by: Benjamin Marzinski --- kpartx/kpartx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c index c24ad6d9..653ce0c8 100644 --- a/kpartx/kpartx.c +++ b/kpartx/kpartx.c @@ -738,7 +738,7 @@ struct block { /* blknr is always in 512 byt

[dm-devel] [PATCH 1/6] Makefile.inc: trim extra information from systemd version

2020-07-27 Thread Benjamin Marzinski
Some systemd versions print extra information in the "pkg-config --modversion" output, which confuses make. Trim this off. Signed-off-by: Benjamin Marzinski --- Makefile.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.inc b/Makefile.inc index e7256e3a..8ea3352d 1

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

2020-07-27 Thread Benjamin Marzinski
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 patch. Also use count_active_paths() in mpath_persist. Signed-off-by

[dm-devel] [PATCH 4/6] libmultipath: count pending paths as active on loads

2020-07-27 Thread Benjamin Marzinski
When multipath loads a table, it signals to udev if there are no active paths. Multipath wasn't counting pending paths as active. This meant that if all the paths were pending, udev would treat the device as not ready, and not run kpartx on it. Even if the pending paths later because active and

Re: [dm-devel] [dm-level] upstream-queue-libmultipath: fix memory leak when iscsi login/out and "multipath -r" executed

2020-07-27 Thread Benjamin Marzinski
On Sat, Jul 25, 2020 at 01:47:01PM +0800, lixiaokeng wrote: > When one iscsi device logs in and logs out with the "multipath -r" > executed at the same time, memory leak happens in multipathd > process. > > The reason is following. When "multipath -r" is executed, the path > will be free in config

Re: [dm-devel] [PATCH 10/14] bdi: remove BDI_CAP_SYNCHRONOUS_IO

2020-07-27 Thread Christoph Hellwig
On Sun, Jul 26, 2020 at 12:06:39PM -0700, Minchan Kim wrote: > > @@ -528,8 +530,7 @@ static ssize_t backing_dev_store(struct device *dev, > > * freely but in fact, IO is going on so finally could cause > > * use-after-free when the IO is really done. > > */ > > - zram->disk->queue-