Reviewed-by: Martin Wilck
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
reinstated. However, this could
lead to newly created multipath devices failing IO, simply because the
path checkers hadn't returned yet. Having udev assume that the the
device is up, like the kernel does, seems like the safer option.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
If the map doesn't unset its hwe pointer before orphaning all the paths,
multipathd will print a warning message in orphan_path() because of
commit "libmultipath: warn if freeing path that holds mpp->hwe".
Signed-off-by: Benjamin Marzinski
---
libmultipath/structs_vec.c | 1 +
mult
On Wed, Aug 05, 2020 at 10:05:19PM +0200, Martin Wilck wrote:
> 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
On Wed, Aug 05, 2020 at 02:05:00PM +0200, Martin Wilck wrote:
> 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
On Thu, Aug 06, 2020 at 10:48:12AM +, Martin Wilck wrote:
> 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
> >
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 and stored in
> > pgp->paths. However, if store_path fails, pp will not be freed,
> > then memory leak
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:
> > 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
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:
> > > From: Martin Wilck
> > >
> > > Also remove the redundant
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 Thu, Jul 09, 2020 at 12:15:53PM +0200, mwi...@suse.com wrote:
> > > > From:
On Mon, Aug 03, 2020 at 10:43:54AM +0800, Zhiqiang Liu wrote:
>
> In replicate_config func, hwtable is allocated by calling get_used_hwes
> func, however it is not freed.
>
> Signed-off-by: Zhiqiang Liu
Reviewed-by: Benjamin Marzinski
> ---
> tests/hwtable.c | 1 +
On Mon, Aug 03, 2020 at 10:41:48AM +0800, Zhiqiang Liu wrote:
>
> In VECTOR_SLOT(V, E), we add the lower bound check of E.
> E cannot be less than zero.
>
> Signed-off-by: Zhiqiang Liu
Reviewed-by: Benjamin Marzinski
> ---
> libmultipath/vector.h | 2 +-
> 1 file ch
On Mon, Aug 03, 2020 at 10:39:29AM +0800, Zhiqiang Liu wrote:
>
> In vector_del_slot func, legal value of input slot is in range of
> [0, VECTOR_SIZE(v)), it means slot value should be less then VECTOR_SIZE(v).
>
>
> Signed-off-by: Zhiqiang Liu
Reviewed-by:
it.
This patch looks fine. However, it has pointed out a larger problem with
the udev_device_get_* functions. This is not the only instance where we
aren't checking the return value of these functions before dereferencing
it.
-Ben
Reviewed-by: Benjamin Marzinski
> Signed-off-by: lut
t old slot as the new allocated slot, and use it by calling
> vector_set_slot func. Finally, the data of last slot is lost.
>
Reviewed-by: Benjamin Marzinski
> Here, if REALLOC or MALLOC fails, we will return NULL.
>
> Signed-off-by: Zhiqiang Liu
> Signed-off-by: lixiaoke
hiqiang Liu
Reviewed-by: Benjamin Marzinski
> ---
> libmultipath/devmapper.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
> index f597ff8b..00ee0dfc 100644
> --- a/libmultipath/devmapper.c
> +++ b/libmultipath/de
ing for something to base upstream patches on, that's
what you want.
> Signed-off-by: Lixiaokeng
> Signed-off-by: Zhiqiang Liu
Reviewed-by: Benjamin Marzinski
>
> ---
> libmultipath/blacklist.c | 74 +++-
> libmultipath/blacklist.h | 4 +--
On Thu, Jul 30, 2020 at 12:01:36PM +0800, lixiaokeng wrote:
> In dm_get_maps func, if vector_alloc_slot(mp) fails, the
> mpp should be free.
>
> Here we call free_multipath(mpp, KEEP_PATHS) to free map.
>
> Signed-off-by: Lixiaokeng
> Signed-off-by: Zhiqiang Liu
r the patch itself (assuming that the correct answer
isn't to just delete the least-pending code),
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Zhiqiang Liu
> Signed-off-by: lixiaokeng
> ---
> libmultipath/dmparser.c | 1 +
> 1 file changed, 1 insertion(+)
>
> di
Signed-off-by: Benjamin Marzinski
---
multipath/main.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/multipath/main.c b/multipath/main.c
index 4c43314e..3da692dc 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -861,9 +861,12 @@ int delegate_to_multipathd(enum
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
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 sys
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
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
-by: Benjamin Marzinski
---
libmpathpersist/mpath_persist.c | 4 +--
libmultipath/structs.c | 47 +
libmultipath/structs.h | 1 -
3 files changed, 21 insertions(+), 31 deletions(-)
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist
reinstated. However, this could
lead to newly created multipath devices failing IO, simply because the
path checkers hadn't returned yet. Having udev assume that the the
device is up, like the kernel does, seems like the safer option.
Signed-off-by: Benjamin Marzinski
---
libmultipath/devmapper.c | 3
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
n store_path fails.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Zhiqiang Liu
> Signed-off-by: lixiaokeng
> ---
> V1->V2: update based on ups/submit-2007 branch.
>
> libmultipath/dmparser.c | 9 +++--
> 1 file changed, 7 insertions(+), 2 deletions(-
On Thu, Jul 23, 2020 at 09:28:51AM +0800, Zhiqiang Liu wrote:
>
>
> On 2020/7/23 4:53, Benjamin Marzinski wrote:
> > On Wed, Jul 22, 2020 at 04:41:28PM +0800, Zhiqiang Liu wrote:
> >> In disassemble_map func, one pp will be allocated and stored in pathvec
> >&
call free_pathgroup(pgp) before going to out tag.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Zhiqiang Liu
> Signed-off-by: lixiaokeng
> ---
> libmultipath/dmparser.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libmultipath/dmpa
ries will also be available here:
> https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
>
> There are tags in that repo for each part of the series.
> This part is tagged "submit-200709-6".
for the part
Reviewed-by: Benjamin Marzinski
> The series handle
ries will also be available here:
> https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
>
> There are tags in that repo for each part of the series.
> This part is tagged "submit-200709-5".
For the part, with the exception of patches 61,63,64,65,66 & 71
Review
; The full series will also be available here:
> https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
>
> There are tags in that repo for each part of the series.
> This part is tagged "submit-200709-4".
For the part, with the exception of patches 44 & 46
Reviewed-by: Ben
t we can't call
> dm_addmap(ACT_CREATE) with an empty WWID is update_path_groups()->
> reload_map(). To make the code easier to review and avoid ugly
> corner cases, simply refuse to create maps with a zero-length
> WWID.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilc
>
> The full series will also be available here:
> https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
>
> There are tags in that repo for each part of the series.
> This part is tagged "submit-200709-1".
For the part, with the exception of patches 8 &am
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've been
> preparing.
> It contains fixes for a customer issue where the same alias was set for
> several maps with
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_SUBSYSTEM_UDEV_FLAG0 flag to tell
> udev not to repeat device detection steps above the multipath
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_pathvec_from_dm().
>
> Signed-off-by: Martin Wilck
> ---
> multipath/main.c | 67
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 b96dead ("[multipathd] remove the
> retry login in uev_remove_path()"): By not adding paths from
>
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
> ---
> libmultipath/structs_vec.c | 37 +++--
> 1 file changed, 23 insertions(+), 14 deletions(-)
>
>
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. In this case, which is new, check_path()
> must reset the delay when it first triggers an uevent.
Maybe I'm
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 haven't been discovered or fully initialized
> yet, and are thus not in the pathvec. These paths need
On Thu, Jul 09, 2020 at 12:51:34PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> With the introduction of INIT_REMOVED, we have to deal with the situation
> when a path is re-added in this state. This enables us to detect the
> situation where a path is added while still part of a map
On Thu, Jul 09, 2020 at 12:51:32PM +0200, mwi...@suse.com wrote:
> From: Martin Wilck
>
> If we don't do this, pathinfo() will fail on these paths, causing
> adopt_paths() to fail.
>
This is probably unnecessary, but it seems safer to make sure that
pp->mpp is set to mpp, before bailing out on
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_BLACKLIST for new paths. There's no reason why we shouldn't do the
> same with paths which are (unexpectedly) already in
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 cause ev_add_path() for a valid
> path to fail because some other path is broken. Fix it by just
> skipping
logging.
> It's based on the previously submitted part I.
>
> The full series will also be available here:
> https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
>
> There are tags in that repo for each part of the series.
> This part is tagged "submit-200709-2&quo
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" work, but it makes the intention more clear.
>
> Signed-off-by: Martin Wilck
> ---
> libmultipath/util.c | 28
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 introduced simple bitmap handling functions. We can do better. This
> patch introduces a bitfield type with overflow detection
fetime and
> can't be removed (e.g. because it's busy) is already covered by the
> current code AFAICT. When a new path is re-added, we'll call adopt_paths
> and verify_paths(), which will make sure that mpp->hwe is set again
> to the pp->hwe member of the newly added path.
On Mon, Jul 13, 2020 at 09:59:43PM +0200, Martin Wilck wrote:
> 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
> >
> >
this code should be
reading 1024 bytes at minmum, I can certainly change this. But when I
looked, I couldn't find a case where reading 512 bytes would cause a
problem.
Signed-off-by: Benjamin Marzinski
---
kpartx/dasd.c | 7 ---
kpartx/gpt.c| 22 +--
kpartx/kpartx.c
by Martin.
Benjamin Marzinski (4):
libmultipath: fix sysfs dev_loss_tmo parsing
kpartx: read devices with direct IO
kpartx: handle alternate bsd disklabel location
libmultipath: fix checker detection for nvme devices
kpartx/bsd.c | 16 ++--
kpartx/dasd.c
Signed-off-by: Benjamin Marzinski
---
kpartx/bsd.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/kpartx/bsd.c b/kpartx/bsd.c
index 0e661fbc..950b0f92 100644
--- a/kpartx/bsd.c
+++ b/kpartx/bsd.c
@@ -1,6 +1,7 @@
#include "kpartx.h"
#include
dev_loss_tmo is a u32 value. However the kernel sysfs code prints it as
a signed integer. This means that if dev_loss_tmo is above INT_MAX, the
sysfs value will be a negative number. Parsing this was causing
sysfs_set_rport_tmo() to fail.
Signed-off-by: Benjamin Marzinski
Signed-off-by: Martin
should not assume that a
devices is ALUA, simply because if failed to detect if alua was
supported.
Fixes: 8794a776 "libmultipath: fix ALUA autodetection when paths are
down"
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/discovery.c | 6
Add the -D option to allow users to skip delegating commands to
multipathd.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/config.h | 1 +
multipath/main.c | 8 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/libmultipath/config.h b
dm_flush_maps() returned both 0 and 1 on error, depending on which part
of the function it was in, but the caller was always treating 0 as a
success. Make dm_flush_maps() always return 1 on error and 0 on success.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath
This will flush all multipath devices.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/devmapper.c | 7 +--
libmultipath/devmapper.h | 2 +-
multipath/main.c | 2 +-
multipathd/cli.c | 1 +
multipathd/cli_handlers.c | 19
elp. If the path was missing from the multipath device,
update_multipath_strings() would already catch that, and quit
check_path() early, which make more sense to me than reloading does.
Signed-off-by: Benjamin Marzinski
---
multipathd/main.c | 44 +++-
1 f
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.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/config.h| 3 ++-
libmultipath/configure.h | 3 ---
multipath
dm_get_map() and dm_get_status() now use symbolic return codes. They
also differentiate between failing to get information from device-mapper
and not finding the requested device. These symboilc return codes are
also used by update_multipath_* functions.
Signed-off-by: Benjamin Marzinski
itself.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
multipath/main.c | 14 ++
multipath/multipath.8 | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/multipath/main.c b/multipath/main.c
index 101fd656..6a24e483 100644
--- a/multipath
eturns.
0002: Changed symbolic return names, and improved some logging.
Benjamin Marzinski (7):
libmultipath: make dm_get_map/status return codes symbolic
multipathd: fix check_path errors with removed map
libmultipath: make dm_flush_maps only return 0 on success
multipathd: add "del maps&q
On Thu, Jul 02, 2020 at 11:52:21AM +, 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:
> > > On Wed, Mar 25, 2020 at 03:16:50PM +, Martin Wilck wrote:
> > >
On Thu, Jul 02, 2020 at 04:45:21PM +, Martin Wilck wrote:
> On Thu, 2020-07-02 at 10:18 -0500, Benjamin Marzinski wrote:
> > On Thu, Jul 02, 2020 at 12:24:32PM +, Martin Wilck wrote:
> > > On Wed, 2020-07-01 at 22:14 -0500, Benjamin Marzinski wrote:
> > > >
On Wed, Jul 01, 2020 at 08:19:57PM +, Martin Wilck wrote:
> On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote:
> > If a multipath device is removed during, or immediately before the
> > call
> > to check_path(), multipathd can behave incorrectly. A missing
&g
On Wed, Jul 01, 2020 at 08:15:49PM +, Martin Wilck wrote:
> On Thu, 2020-06-25 at 15:42 -0500, Benjamin Marzinski wrote:
> > dm_get_map() and dm_get_status() now use symbolic return codes. They
> > also differentiate between failing to get information from dev
On Thu, Jul 02, 2020 at 03:00:37PM +, Martin Wilck wrote:
> On Wed, 2020-07-01 at 17:39 -0500, Benjamin Marzinski wrote:
> > If kpartx is used on top of shared storage, and a device has its
> > partition table changed on one machine, and then kpartx is run on
> > an
On Thu, Jul 02, 2020 at 02:31:17PM +, Martin Wilck wrote:
> On Wed, 2020-07-01 at 17:39 -0500, Benjamin Marzinski wrote:
> > dev_loss_tmo is a u32 value. However the kernel sysfs code prints it
> > as
> > a signed integer. This means that if dev_loss_tmo is above INT_M
On Thu, Jul 02, 2020 at 03:12:58PM +, Martin Wilck wrote:
> On Wed, 2020-07-01 at 17:39 -0500, Benjamin Marzinski wrote:
> > bsd disk labels can either be at the start of the second sector, or
> > 64
> > bytes into the first sector, but kpartx only handled the fi
On Thu, Jul 02, 2020 at 12:24:32PM +, 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:
> > > On Thu, 2020-06-18 at 18:06 -0500, Benjamin Marzinski wrote:
> > > &g
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://github.com/bmarzins/test_programs.git
> >
> > You just need t
dev_loss_tmo is a u32 value. However the kernel sysfs code prints it as
a signed integer. This means that if dev_loss_tmo is above INT_MAX, the
sysfs value will be a negative number. Parsing this was causing
sysfs_set_rport_tmo() to fail.
Signed-off-by: Benjamin Marzinski
---
libmultipath
should not assume that a
devices is ALUA, simply because if failed to detect if alua was
supported.
Fixes: 8794a776 "libmultipath: fix ALUA autodetection when paths are
down"
Signed-off-by: Benjamin Marzinski
---
libmultipath/discovery.c | 6 ++
libmultipath/propsel.c |
bsd disk labels can either be at the start of the second sector, or 64
bytes into the first sector, but kpartx only handled the first case.
However the second case is what parted creates, and what the linux
kernel partition code expects. kpartx should handle both cases.
Signed-off-by: Benjamin
this code should be
reading 1024 bytes at minmum, I can certainly change this. But when I
looked, I couldn't find a case where reading 512 bytes would cause a
problem.
Signed-off-by: Benjamin Marzinski
---
kpartx/dasd.c | 7 ---
kpartx/gpt.c| 22 ++
kpartx/kpartx.c
This is a small collection of individual bug fix patches that apply on
top of my previous patch set.
Benjamin Marzinski (4):
libmultipath: fix sysfs dev_loss_tmo parsing
kpartx: read devices with direct IO
kpartx: handle alternate bsd disklabel location
libmultipath: fix checker detection
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.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/config.h| 3 ++-
libmultipath/configure.h | 3 ---
multipath
re are likely still some conversations to be had about what we need
to do to remove a device in multipath, and in what order. So, for now,
I just kept all those functions the same, and just added the code
necessary to make multpathd work with them correctly, as is.
Benjamin Marzinski (7):
libmu
dm_flush_maps() returned both 0 and 1 on error, depending on which part
of the function it was in, but the caller was always treating 0 as a
success. Make dm_flush_maps() always return 1 on error and 0 on success.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath
dm_get_map() and dm_get_status() now use symbolic return codes. They
also differentiate between failing to get information from device-mapper
and not finding the requested device. These symboilc return codes are
also used by update_multipath_* functions.
Signed-off-by: Benjamin Marzinski
itself.
Signed-off-by: Benjamin Marzinski
---
multipath/main.c | 14 ++
multipath/multipath.8 | 4 ++--
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/multipath/main.c b/multipath/main.c
index 101fd656..6a24e483 100644
--- a/multipath/main.c
+++ b/multipath/main.c
Add the -D option to allow users to skip delegating commands to
multipathd.
Signed-off-by: Benjamin Marzinski
---
libmultipath/config.h | 1 +
multipath/main.c | 8 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/libmultipath/config.h b/libmultipath/config.h
index
This will flush all multipath devices.
Signed-off-by: Benjamin Marzinski
---
libmultipath/devmapper.c | 7 +--
libmultipath/devmapper.h | 2 +-
multipath/main.c | 2 +-
multipathd/cli.c | 1 +
multipathd/cli_handlers.c | 19 +++
multipathd
elp. If the path was missing from the multipath device,
update_multipath_strings() would already catch that, and quit
check_path() early, which make more sense to me than reloading does.
Signed-off-by: Benjamin Marzinski
---
multipathd/main.c | 37 ++---
1 file chan
On Fri, Jun 19, 2020 at 01:42:47PM +, 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:
> > > On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote:
> > &
On Fri, Jun 19, 2020 at 08:32:34AM +0200, Hannes Reinecke wrote:
> >>
> >>fac68d7 is related to the famous "dm-multipath: Accept failed paths for
> >>multipath maps" patch (e.g.
> >>https://patchwork.kernel.org/patch/3368381/#7193001), which never made
> >>it upstream. SUSE kernels have shipped
On Thu, Jun 18, 2020 at 07:34:38PM +, Martin Wilck wrote:
> On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote:
> > If a multipath device is removed during, or immediately before the
> > call
> > to check_path(), multipathd can behave incorrectly. A missing
&g
On Thu, Jun 18, 2020 at 03:27:22PM +, Martin Wilck wrote:
> On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote:
> > Make do_get_info() differentiate between dm failures and missing
> > devices, and update callers to retain their current behavior. Also,
> &g
On Thu, Jun 18, 2020 at 08:44:10PM +, Martin Wilck wrote:
> On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote:
> > Add the -D option to allow users to skip delegating commands to
> > multipathd.
> >
> > Signed-off-by: Benjamin Marzinski
> > --
On Thu, Jun 18, 2020 at 08:37:20PM +, Martin Wilck wrote:
> On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote:
> > This will flush all multipath devices.
> >
> > Signed-off-by: Benjamin Marzinski
> > ---
> > libmultipath/devmapper.c | 7
On Thu, Jun 18, 2020 at 08:06:53PM +, Martin Wilck wrote:
> On Thu, 2020-06-18 at 13:04 -0500, Benjamin Marzinski wrote:
> > On Thu, Jun 18, 2020 at 09:00:49AM +, Martin Wilck wrote:
> > >
> > > With queue_if_no_paths, there could be outstanding IO even i
On Thu, Jun 18, 2020 at 09:00:49AM +, Martin Wilck wrote:
> On Wed, 2020-06-17 at 19:24 -0500, Benjamin Marzinski wrote:
> >
> > One source of complexity in these patches is that multipath suspends
> > the
> > device with flushing before removing it, while multipath
itself.
Signed-off-by: Benjamin Marzinski
---
multipath/main.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/multipath/main.c b/multipath/main.c
index 101fd656..6a24e483 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -820,6 +820,20 @@ int delegate_to_multipathd(enum
Add the -D option to allow users to skip delegating commands to
multipathd.
Signed-off-by: Benjamin Marzinski
---
libmultipath/config.h | 1 +
multipath/main.c | 15 +++
multipath/multipath.8 | 16 +++-
3 files changed, 23 insertions(+), 9 deletions(-)
diff --git
ce is open, I don't see the benefit to
doing this anymore. Removing it would allow multipathd and multipath to
use the same code to remove maps. Any thoughts?
Benjamin Marzinski (7):
libmultipath: change do_get_info returns
multipathd: fix check_path errors with removed map
libmultipath: make
Make do_get_info() differentiate between dm failures and missing
devices, and update callers to retain their current behavior. Also,
rename it and make it external. These changes will be used by future
commits.
Signed-off-by: Benjamin Marzinski
---
libmultipath/devmapper.c | 29
If a quoted string starts with '#' or '!', the parser will stop
parsing the line, thinking that it's a comment. It should only
be checking for comments outside of quoted strings. Fixed this and
added unit tests to verify it.
Signed-off-by: Benjamin Marzinski
---
libmultipath/parser.c | 4
_blacklist_exceptions() and _blacklist_exceptions_device() are exactly
the same as _blacklist() and _blacklist_device(), so remove them, and
give the remaining functions to a more general name.
Signed-off-by: Benjamin Marzinski
---
libmultipath/blacklist.c | 62
901 - 1000 of 2020 matches
Mail list logo