= timeval_to_us();
> +
> +delay = after - before;
> +if (delay < 0)
> +{
> +condlog(0, "%s: delay calc error", pp->dev);
> +return 1;
> +}
> +
> +min = (min <= delay) ? min : delay;
>
> Signed-off-by: Benjamin Marzinski <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
On Thu, 2017-05-11 at 21:21 +0100, Alasdair G Kergon wrote:
> On Thu, May 11, 2017 at 09:49:14PM +0200, Martin Wilck wrote:
> > Here is an idea: the best way to avoid the race mentioned by Mike
> > might
> > be to set priv->global_event_nr to the h
is only
set once per makefile.
Martin Wilck (2):
libmultipath: print.c: make sure lines are 0-terminated
multipath-tools: fix compilation with gcc < 4.9
Makefile.inc | 15 ++-
libmultipath/print.c | 25 +
2 files changed, 31 inse
len - 1) is equivalent to
(TAIL >= 0). It should always hold the way ENDLINE is called
after PRINT and PAD in print.c, and is only added as an
additional safeguard, e.g. against future code changes.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/print.c | 25 +
their
/usr counterparts, nothing changes.
Comments are welcome.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
Makefile.inc | 4 +++-
libdmmp/Makefile | 11 ++-
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc
index ad55aa10.
On Tue, 2017-05-16 at 12:33 -0500, Benjamin Marzinski wrote:
> On Thu, May 11, 2017 at 10:26:52PM +0200, Martin Wilck wrote:
> > On Tue, 2017-05-09 at 11:57 -0500, Benjamin Marzinski wrote:
> > > When multipath reloads a device, it can either fail while loading
> > > t
LOCK_MONOTONIC, );
> +after = timeval_to_us();
> +
> +delay = after - before;
> +
> +min = (min <= delay) ? min : delay;
> +max = (max >= delay) ? max : delay;
> +
> +toldelay += delay;
> + }
> +
> +toldelay
Under certain conditions, the output of "multipath -ll" or
"multipathd show topology", or the multipathd logs, may
contain garbage characters. Fix that by making sure that
the strings are always properly zero-terminated.
Note 1: The way this is coded, the previously written
character is
anism.
My intention at was to keep the patches small and non-controversial,
therefore I didn't delve into the big issues just yet.
Martin Wilck (2):
libmultipath: print.c: make sure lines are 0-terminated
multipath-tools: fix compilation with gcc < 4.9
Makefile.inc | 15 ++-
gcc supports -fstack-protector-strong since v4.9 only. Add a "poor man's
autoconf" test to check whether the option is supported on the given
build system.
Fixes: 596f51f3
"multipath-tools: Replace -fstack-protector with -fstack-protector-strong"
Signed-off-by: Martin Wi
" flag can be used
to force delting these partitions, too.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/devmapper.c | 2 +-
kpartx/kpartx.c| 34 ++
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/kpartx/devmapper.c b/kpartx/devmapper.
of parent dev and partition is only valid
for dm devices. For non-dm devices such as loop, "/dev/mapper/loop0"
could, theoretically, be a partition of "/dev/loop0"
(and we don't want to rely on map names).
Fixes: 3d709241 "kpartx: sanitize delete partitions"
Sign
This is a unit test program for kpartx, in particular for deleting
partitions.
NOTE: This test program fails with current kpartx; full patch series
needed to make it work.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/test-kpartx
This is questionable, it's
hard to assign a "type" to such maps anyway.
Fix this by returning an error for multi-target maps.
This is analogous to the patch
"kpartx: don't treat multi-linear mappings as partitions".
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmult
The kernel does not support the "no_partitions" feature - remove it.
Distributions who want to keep support for this feature should
re-enable it with a distro-specific patch.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/devmapper.c | 29 -
For non-existent maps (ENXIO from ioctl()), dm_task_run and
dm_task_get_info return success. We need to check info.exists.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/devmapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kpartx/devmapper.c b/
This function is not used any more.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/lopart.c | 31 ---
kpartx/lopart.h | 1 -
2 files changed, 32 deletions(-)
diff --git a/kpartx/lopart.c b/kpartx/lopart.c
index 2eb3f631..44f0c277 100644
--- a/
kpartx -d treats any map that has a "linear" mapping into a
device as first target as a partition of this device.
This is wrong, because linear mappings may consist of
several pieces, combining multiple devices into one
(LVM logical volumes are an example of such a
mapping). Partitions have to be
nstants.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/devmapper.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/kpartx/devmapper.c b/kpartx/devmapper.c
index 8aca9592..8b125be5 100644
--- a/kpartx/devmapper.c
+++ b/kpartx/devmapper.c
@@
us, as partition UUIDs start with "part%s-"
anyway.
- Added the trivial fix 12/12.
Martin Wilck (12):
kpartx: test-kpartx: new unit test program
kpartx: remove "no_partitions" support
kpartx: remove is_loop_device
kpartx: relax and improve UUID check in dm_compare_uui
Rather then searching through all of /dev, look up loop devices
in /sys/devices/virtual/block. This is cleaner and more robust
(/dev/loop$Xp$Y symlinks may confuse kpartx).
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/lopart.c | 42 +++---
be unreliable.
Therefore, convert relative to absolute path for regular files.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/kpartx.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 587c3dfe..c76b5b46 100644
--- a/
Finish the work started in ea436715. Fixes a compilation warning.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/lopart.c| 2 +-
kpartx/sysmacros.h | 9 -
2 files changed, 1 insertion(+), 10 deletions(-)
delete mode 100644 kpartx/sysmacros.h
diff --git a/kpartx/lopa
It would be guaranteed
that if any event had occured after the previous DM_LIST_DEVICES,
whether or not that had been before or after the poll() call, userspace
would notice.
Cheers,
Martin
--
Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendör
On Thu, 2017-05-11 at 12:46 -0500, Benjamin Marzinski wrote:
> On Thu, May 11, 2017 at 02:42:08PM +0200, Martin Wilck wrote:
> > Hi Ben,
> >
> > On Mon, 2017-04-24 at 17:39 -0500, Benjamin Marzinski wrote:
> >
> > > When users run kpartx, they would naturally
simply store all relevant
information from DM_DEVICE_INFO in the mpp structure in the first
place, avoiding the need to do this ioctl multiple times to get various
pieces of information.
That can be done in a separate patch, of course.
Reviewed-by: Martin Wilck <mwi...@suse.com>
Regards
Martin
off-by: Benjamin Marzinski <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@re
On Thu, 2017-05-11 at 09:21 -0400, Mike Snitzer wrote:
> On Thu, May 11 2017 at 5:43am -0400,
> Martin Wilck <mwi...@suse.com> wrote:
>
> > On Thu, 2017-05-11 at 11:39 +0200, Martin Wilck wrote:
> > > On Tue, 2017-05-09 at 12:10 -0700, Andy Grover wrote:
> &
the latency intevals e.g
like this:
< 10us, 10us-100us, 100us-1ms, 1ms-10ms, 10ms-100ms, > 100ms
IMO that would be better, in particular if the latencies differ
strongly between paths.
Regards
Martin
--
Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH
Clarify the documentation about option precedence.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
multipath/multipath.conf.5 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index f04ff194..6959ba5c
Remove the FIXME markers by filling in missing content,
and make some other minor fixes.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
multipath/multipath.conf.5 | 48 +-
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/mul
The logic applied here should match the logic in select_features().
This is achieved by calling reconcile_features_with_options().
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/config.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff
It is wrong to remove the queue_if_no_path feature if no_path_retry
is unset. Rather, in this case the feature should neither be added
nor removed.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/dmparser.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff
Change the argument type for the feature to add or remove to
const char*, making it possible to pass const strings without
warnings.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/structs.c | 30 --
libmultipath/structs.h | 4 ++--
2 files chang
>features (3/8, 4/8)
* Fixed whitespace error (6/8)
* Added deprecated warnings (8/8)
- Made sure the same logic is used in propsel.c and config.c by
calling the same function (3/8, 4/8)
- Added deprecated warnings (8/8)
Martin Wilck (8):
libmultipath: load_config: skip setting unnece
ures" settings are encountered.
So far these "features" settings will only be ignored if the
respective other keyword is set, so in particular
'features "1 queue_if_no_path"' will still work as expected, but
cause the warning to be printed.
We should consider ignoring the
t: use extern struct udev from main program"
"libmultipath: lazy device-mapper initialization"
"mpathpersist.8: add missing documentation for -K, -C, -l"
Martin
--
Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer,
On Tue, 2017-06-20 at 13:44 -0500, Benjamin Marzinski wrote:
> Review and comments are highly welcome.
>
> ACK for the set
I found another issue with the patch set, will send v3 shortly.
Martin
--
Dr. Martin Wilck <mwi...@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux
On Thu, 2017-06-22 at 08:23 +0200, Hannes Reinecke wrote:
> On 06/21/2017 05:06 PM, Martin Wilck wrote:
> > We set the queue_if_no_path feature in assemble_map() already,
> > no need to set it here again.
> >
> > Signed-off-by: Martin Wilck <mwi...@suse.com>
>
On Thu, 2017-06-22 at 08:21 +0200, Hannes Reinecke wrote:
> On 06/21/2017 05:06 PM, Martin Wilck wrote:
> > Setting a device handler only works if retain_attached_hw_handler
> > is 'no', or if the kernel didn't auto-assign a handler. If this
> > is not the case, don'
On Wed, 2017-06-21 at 17:06 +0200, Martin Wilck wrote:
>
> Changes wrt v2:
> - Added Acked-by:/Reviewed-by: tags
> - 1/11: clarify comment in select_max_sectors_kb (Hannes Reinecke)
> - 3/11: call select_retain_hwhandler before select_features
> - 8/11: d
Kernels 4.3 and newer (commit 1bab0de0 "dm-mpath, scsi_dh: don't
let dm detach device handlers") imply "retain_attached_hw_handler yes".
Clarify this in the propsel code, log messages, and documentation.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmu
attribute must be updated after domap().
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/configure.c | 52 +++-
libmultipath/discovery.c | 4
libmultipath/propsel.c | 15 ++
libmultipath/structs.h | 2 ++
4 f
ures" settings are encountered.
So far these "features" settings will only be ignored if the
respective other keyword is set, so in particular
'features "1 queue_if_no_path"' will still work as expected, but
cause the warning to be printed.
We should consider ignoring the
Change the argument type for the feature to add or remove to
const char*, making it possible to pass const strings without
warnings.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
libmultipath/st
The logic applied here should match the logic in select_features().
This is achieved by calling reconcile_features_with_options().
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
---
libmultipath/config.c | 20 +++-
1
s (8/8)
Changes wrt v2:
- Added Acked-by:/Reviewed-by: tags
- 1/11: clarify comment in select_max_sectors_kb (Hannes Reinecke)
- 3/11: call select_retain_hwhandler before select_features
- 8/11: don't suggest using retain_attached_hw_handler in log msg
- 9/11, 10/11, 11/11: new
Martin Wilck (11)
It is wrong to remove the queue_if_no_path feature if no_path_retry
is unset. Rather, in this case the feature should neither be added
nor removed.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
---
libmultipath/dmparser.c | 5 +
Put this logic into a separate function, which can be used
from other places in the code.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/configure.c | 6 ++---
libmultipath/propsel.c | 68 +---
libmultipath/propsel.h | 3
Remove the FIXME markers by filling in missing content,
and make some other minor fixes.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
---
multipath/multipath.conf.5 | 48 +-
1 file
es setting at all.
For some config settings, we need to use declare_def_snprint_defint()
now to make sure "multipathd show config" prints all defaults correctly.
To avoid confusion, we don't do this for "max_sectors", because
multipathd leaves this untouched by default.
Si
Setting a device handler only works if retain_attached_hw_handler
is 'no', or if the kernel didn't auto-assign a handler. If this
is not the case, don't even attempt to set a different handler.
This requires reading the sysfs "dh_state" path attribute.
Signed-off-by: Martin
Remove the FIXME markers by filling in missing content,
and make some other minor fixes.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
multipath/mul
Kernels 4.3 and newer (commit 1bab0de0 "dm-mpath, scsi_dh: don't
let dm detach device handlers") imply "retain_attached_hw_handler yes".
Clarify this in the propsel code, log messages, and documentation.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Reviewed-by: Hann
ures" settings are encountered.
So far these "features" settings will only be ignored if the
respective other keyword is set, so in particular
'features "1 queue_if_no_path"' will still work as expected, but
cause the warning to be printed.
We should consider ignoring the
- Added Reviewed-by: tags (kept Ben's Ack in 4/11 although patch slightly
changed)
- 4/11: use a buffer on stack rather than malloc (Hannes Reinecke)
- 10/11: Simplify by checking dh_state only in select_handler (Hannes Reinecke)
Martin Wilck (11):
libmultipath: load_config: skip sett
Clarify the documentation about option precedence.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
multipath/multipath.conf.5 | 4 +++-
1 file changed, 3 insertions(+), 1 delet
Put this logic into a separate function, which can be used
from other places in the code.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Reviewed-by: Hannes Reinecke <h...@suse.com>
---
libmultipath/configure.c | 6 ++---
libmultipath/propsel.c | 68 ++
es setting at all.
For some config settings, we need to use declare_def_snprint_defint()
now to make sure "multipathd show config" prints all defaults correctly.
To avoid confusion, we don't do this for "max_sectors", because
multipathd leaves this untouched by default.
Si
The logic applied here should match the logic in select_features().
This is achieved by calling reconcile_features_with_options().
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
---
libmultipath/config.c | 15 ++-
1 fil
Change the argument type for the feature to add or remove to
const char*, making it possible to pass const strings without
warnings.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
Reviewed-by: Hannes Reinecke <h...@suse.com>
It is wrong to remove the queue_if_no_path feature if no_path_retry
is unset. Rather, in this case the feature should neither be added
nor removed.
Signed-off-by: Martin Wilck <mwi...@suse.com>
Acked-by: Benjamin Marzinski <bmarz...@redhat.com>
Reviewed-by: Hannes Reinecke &l
We set the queue_if_no_path feature in assemble_map() already,
no need to set it here again.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/configure.c | 15 ---
1 file changed, 15 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
On Thu, 2017-06-22 at 14:21 -0500, Benjamin Marzinski wrote:
> On Thu, Jun 22, 2017 at 08:23:44AM +0200, Hannes Reinecke wrote:
> > On 06/21/2017 05:06 PM, Martin Wilck wrote:
> > > We set the queue_if_no_path feature in assemble_map() already,
> > > n
Fixes: 22736419 "kpartx.rules: respect skip_kpartx flag"
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/kpartx.rules | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules
index a9587917..64d550de 100644
--- a/kpa
On Fri, 2017-06-23 at 19:25 +0200, Xose Vazquez Perez wrote:
> On 06/22/2017 04:59 PM, Martin Wilck wrote:
>
> > Kernels 4.3 and newer (commit 1bab0de0 "dm-mpath, scsi_dh: don't
> > let dm detach device handlers") imply "retain_attached_hw_handler
> > yes
Hi Ben,
On Thu, 2017-06-15 at 14:54 -0500, Benjamin Marzinski wrote:
> On Wed, Jun 14, 2017 at 12:55:50AM +0200, Martin Wilck wrote:
> > The "features" option in multipath.conf can possibly conflict
> > with the "no_path_retry" and "retain_attached
Do you like it better this way?
---
libmultipath/propsel.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c
index f11052f2..6d628052 100644
--- a/libmultipath/propsel.c
+++ b/libmultipath/propsel.c
@@ -798,8 +798,9 @@ int
LETE;
> +done:
> if (pgpath) {
> - ps = >pg->ps;
> + struct path_selector *ps = >pg->ps;
> +
> if (ps->type->end_io)
> ps->type->end_io(ps, >path, mpio-
> >nr_bytes);
> }
>
> - return r;
> + return error;
> }
>
> /*
--
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
Furthermore, add a reference to the sg_persist man page.
---
mpathpersist/mpathpersist.8 | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/mpathpersist/mpathpersist.8 b/mpathpersist/mpathpersist.8
index 4b15666f..a8982e65 100644
---
On Thu, 2017-05-18 at 16:37 -0500, Benjamin Marzinski wrote:
> The reason for the second resume in my commit "libmultipath: fix
> suspended devs from failed reloads" is not obvious from the multipath
> code, so add a comment.
Nice, thank you.
Martin
--
Dr. Martin Wilck <
g(3, "%s: reply = %s", param, *reply);
>
how about this simpler patch, as prflag is actually a boolean?
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index 04c73866..c31ebd34 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -1337,7 +1337,7 @@ cli_g
> + snprintf(sdsname, sizeof(sdsname), "%.16s", inqBuffp + 112);
>
> if (strstr(sdsname , preferredsds))
> return 1;
I was wondering whether passing sizeof(sdsname) rather than 17 might
make a difference, and verified that that isn't the case.
Revie
On Tue, 2017-06-13 at 12:53 -0700, Bart Van Assche wrote:
> On 06/13/17 12:29, Martin Wilck wrote:
> > how about this simpler patch, as prflag is actually a boolean?
> >
> > diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
> > index 04c73866..c31ebd34
t; Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com>
> ---
> libmultipath/dmparser.c | 67 +++--
>
> 1 file changed, 31 insertions(+), 36 deletions(-)
>
Reviewed-by: Martin Wilck <mwi...@suse.com>
--
Dr. Martin Wilck
d to lookup parameters in the hwtable, and there we have
no entries with empty vendor or product.
One side issue that needs to be considered is printout, though:
snprint_multipath_(vpr|prod|vend) will just print nothing if either
vendor or product has zero length. It would be good if they'd print
e.g. ""
lar case, I think the problem at hand be easily solved
without resorting to _GNU_SOURCE.
But well, it's not a thing worth fighting about. May Christophe decide.
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
e config settings become more appropriate.
Review and comments are highly welcome.
Regards,
Martin
Martin Wilck (7):
libmultipath: load_config: skip setting unnecessary defaults
libmultipath: add/remove_feature: use const char* for feature
libmultipath: clarify option conflicts fo
t;
is set is treated as if "no_path_retry queue" had been set.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/config.c | 20
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/libmultipath/config.c b/libmultipath/config.c
index 61bbba91
It is wrong to remove the queue_if_no_path feature if no_path_retry
is unset. Rather, in this case the feature should neither be added
nor removed.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/dmparser.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff
Change the argument type for the feature to add or remove to
const char*, making it possible to pass const strings without
warnings.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/structs.c | 30 --
libmultipath/structs.h | 4 ++--
2 files chang
'features' setting at all.
With this patch, these defaults are correctly logged as "multipath internal".
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/config.c | 16
libmultipath/propsel.c | 2 +-
2 files changed, 1 insertion(+), 17 deletions(-)
rules are
defined for "retain_attached_hw_handler".
Make this behavior more consistent by always giving precedence
to the explicit config file options, and improve logging.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmultipath/configure.c | 4 ++--
libmultipath/propsel.c
Remove the FIXME markers by filling in missing content,
and make some other minor fixes.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
multipath/multipath.conf.5 | 48 +-
1 file changed, 26 insertions(+), 22 deletions(-)
diff --git a/mul
Clarify the documentation about option precedence.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
multipath/multipath.conf.5 | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
index f04ff194..e6944faf
|...|
> --|
> Priority Rank Partitioning
>
> Signed-off-by: Yang Feng <philip.y...@huawei.com>
> Reviewed-by: Benjamin Marzinski <bmarz...@redhat.com>
> Reviewed-by: Martin Wilck <mwi...@suse.com>
> Reviewed-by: Xose Vaz
On Mon, 2017-05-08 at 09:47 +0200, Martin Wilck wrote:
> The full partition UUID for partitions used by my code looks like
> this
> (see patch 08/10):
>
> {UUID_PREFIX}${MAJOR}:${MINOR}-${NONDM_UUID_SUFFIX}"
... where UUID_PREFIX is what kpartx uses anyway, i.e. "part$N&
On Fri, 2017-05-05 at 23:30 +0100, Alasdair G Kergon wrote:
> On Sat, May 06, 2017 at 12:05:57AM +0200, Martin Wilck wrote:
> > Introduce a "fake" UUID for these devices to make sure kpartx
> > deletes only devices it had created previously. Otherwise kpartx
>
On Fri, 2017-05-05 at 23:18 +0100, Alasdair G Kergon wrote:
> On Sat, May 06, 2017 at 12:05:49AM +0200, Martin Wilck wrote:
> > 3) kpartx should only delete "partitions", which are single-
> > target
> > linear mappings into a block device. Other
On Sat, 2017-05-06 at 00:30 +0200, Martin Wilck wrote:
> On Fri, 2017-05-05 at 23:18 +0100, Alasdair G Kergon wrote:
> > On Sat, May 06, 2017 at 12:05:49AM +0200, Martin Wilck wrote:
> > > 3) kpartx should only delete "partitions", which are single-
> > &
" flag can be used
to force delting these partitions, too.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/devmapper.c | 2 +-
kpartx/kpartx.c| 29 +
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/kpartx/devmapper.c b/kpartx/devmapper.
Commit 3d709241 causes kpartx to attempt a dm ioctl on a loop
device. This causes an error message
"device-mapper: table ioctl on loop4 failed: No such device or address".
Fixes: 3d709241 "kpartx: sanitize delete partitions"
Signed-off-by: Martin Wilck <mwi...@suse.com>
This is a unit test program for kpartx, in particular for deleting
partitions.
NOTE: This test program fails with current kpartx; full patch series
needed to make it work.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/test-kpartx
kpartx -d treats any map that has a "linear" mapping into a
device as first target as a partition of this device.
This is wrong, because linear mappings may consist of
several pieces, combining multiple devices into one
(LVM logical volumes are an example of such a
mapping). Partitions have to be
be unreliable.
Therefore, convert relative to absolute path for regular files.
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/kpartx.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index d9057fba..3bd16452 100644
--- a/
of parent dev and partition is only valid
for dm devices. For non-dm devices such as loop, "/dev/mapper/loop0"
could, theoretically, be a partition of "/dev/loop0"
(and we don't want to rely on map names).
Fixes: 3d709241 "kpartx: sanitize delete partitions"
Sign
Rather then searching through all of /dev, look up loop devices
in /sys/devices/virtual/block. This is cleaner and more robust
(/dev/loop$Xp$Y symlinks may confuse kpartx).
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
kpartx/lopart.c | 42 +++---
This is questionable, it's
hard to assign a "type" to such maps anyway.
Fix this by returning an error for multi-target maps.
This is analogous to the patch
"kpartx: don't treat multi-linear mappings as partitions".
Signed-off-by: Martin Wilck <mwi...@suse.com>
---
libmult
ent and is therefore
included although this series is otherwise focused only on kpartx.
Feedback is welcome.
Martin Wilck (10):
kpartx: test-kpartx: new unit test program
kpartx: avoid ioctl error for loop devices
kpartx: remove is_loop_device
kpartx: dm_remove_partmaps: support non-dm devic
101 - 200 of 2117 matches
Mail list logo