On Wed, Mar 07, 2018 at 03:17:51PM +0100, Martin Wilck wrote:
> The internal usage of SIGALRM by setitimer() function may cause subtle
> conflicts with other uses of SIGALRM, either by multipath-tools code itself
> (e.g. lock_file()) or libc (e.g. glob()).
>
> This patch changes the checkerloop to
Add test cases for parsing the config file.
Some of these tests currently fail. The patches that follow fix them.
Signed-off-by: Martin Wilck
---
tests/Makefile | 2 +-
tests/globals.c | 1 +
tests/parser.c | 479
3 files changed, 4
A corner case of the previous patch are strings starting with a double quote,
such as '"prepended to itself is false" prepended to itself is false' or
'"" is the empty string', and in particular, the string '"' ("\"" in C
notation), which is indistinguishable from the "QUOTE" token in the parsed
s
Describe the syntax of attribute / value pairs, comments, and quoted
strings, as well as the peculiarities of section beginnings and ends.
Also describe the newly added '""' feature.
Signed-off-by: Martin Wilck
---
multipath/multipath.conf.5 | 17 +
1 file changed, 17 insertions(
This series was motivated by the real-world problem that a user couldn't
figure out how to write a blacklist entry for a device called '1.8" SSD'.
Fixing this for good turned out to be a little tricky, therefore I also
added a test suite.
Changes since v1:
- fixed a problem with parsing the comma
We have seen model strings lile '2.5" SSD' which can't be parsed
by the current config parser. This patch fixes this by allowing
'""' to represent a double quote character inside a a string.
The above model string could now be entered in the config file like this:
blacklist {
vendor Some
Between double quotes, the parser currently strips leading (but not
trailing) whitespace. That's inconsistent and unexpected. Fix it.
Signed-off-by: Martin Wilck
---
libmultipath/parser.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libmultipath/parser.c b/libmultipath/p
Not all the implemented methods to derive the UID rely on udev
information being present. For example getuid callout, rbd,
and the SCSI vpd code work fine without it. It's unlikely that
we don't get udev data, but we want to be as good as possible
at deriving the uid.
Signed-off-by: Martin Wilck
The VPD code won't work for non-SCSI devices, anyway. For indentation
reasons, I moved the "retrigger_tries" case to a separate function,
which is also called only for SCSI devices.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 50 +++-
1
Print the warning about changed WWID not only if disable_changed_wwids
is set, but always. It's actually more dangerous if that option is
not set.
Signed-off-by: Martin Wilck
---
multipathd/main.c | 21 +
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/multipat
Hi Christophe,
this small series fixes some minor glitches I found in the current path
discovery code, and attempts to implement the safe part of the functionality
discussed in the thread "multipathd: update path's udev in uev_update_path"
in January (based on an idea from Wu Chongyun).
Resending
Update pp->udev and those path attributes that can be cheaply
updated from sysfs, i.e. without IO to the disk.
Signed-off-by: Martin Wilck
---
multipathd/main.c | 8
1 file changed, 8 insertions(+)
diff --git a/multipathd/main.c b/multipathd/main.c
index e9668205ce92..6e6c52a52783 1006
The FREE_CONST macro is of questionable value, as reviewers have pointed
out. The users of this macro were mostly functions that called
uevent_get_dm_xyz(). But these functions don't need to return const char*,
as they allocate the strings they return. So my change of the prototype
was wrong. This
From: Bart Van Assche
Pass the VPD page number to sgio_get_vpd() such that the page needed
by the caller is queried instead of page 0x83. Fix the statement that
computes the length of the page returned by do_inq(). Fix the return
code check in the caller of sgio_get_vpd().
Signed-off-by: Bart Va
From: Chongyun Wu
enable feature disable changed wwid by default.
Signed-off-by: Chongyun Wu
Signed-off-by: Martin Wilck
---
libmultipath/defaults.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
index c9e3411aa579..2b270c
The default values printed by "multipath -t" or "multipathd show config"
for "detect_prio", "detect_checker", and "retain_attached_hw_handler"
don't match the actual compiled-in defaults. Moreover, several other
options would also be displayed wrongly if the defaults were changed.
Signed-off-by: M
Hi Christophe,
I'm reposting the following patches that have been reviewed already.
I think they should be merged.
(Well, the last one has not officially been reviewed but it makes no
functional changes and I'm quite positive Bart would approve).
Regards,
Martin
Bart Van Assche (4):
libmultipa
From: Bart Van Assche
Discovered by Coverity (CID 173257).
Signed-off-by: Bart Van Assche
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 9efcaac81dc1..71
From: Bart Van Assche
Avoid that the strchr() call in this function examines uninitialized
data on the stack. This patch avoids that Coverity reports the following:
CID 173252: Error handling issues (CHECKED_RETURN)
"read(int, void *, size_t)" returns the number of bytes read, but it i
From: Chongyun Wu
cli_list_status will access vecs->pathvec which should have lock
protection, otherwise might get inconsistent data or other
problem.
Signed-off-by: Chongyun Wu
Signed-off-by: Martin Wilck
---
multipathd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Bart Van Assche
This patch avoids that Coverity reports the following for the code
in libmultipath/prioritizers/alua_rtpg.c:
CID 173256: Integer handling issues (SIGN_EXTENSION)
Suspicious implicit sign extension: "buf[0]" with type "unsigned char" (8
bits, unsigned) is promoted
Cc: Christophe Varoqui
Cc: device-mapper development
Signed-off-by: Xose Vazquez Perez
---
libmultipath/hwtable.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c
index 65b7835..fe71d14 100644
--- a/li
Hi Christophe,
thanks for catching up. This series fixes immediate problems with
0.7.5. The first one corresponds to my previously posted
"[PATCH v3 2/2] multipathd: start marginal path checker thread lazily",
and fixes a crash. The others fix the problens reported by Xose.
Regards
Martin
Martin
If we've never created the io_error checker thread, we shouldn't
cancel it.
Fixes: 160da9fa4339 "multipathd: start marginal path checker thread
lazily"
Signed-off-by: Martin Wilck
---
libmultipath/io_err_stat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libmultipath/io_err_stat.c b/
They were absorbed by HPE time ago.
Cc: Christophe Varoqui
Cc: device-mapper development
Signed-off-by: Xose Vazquez Perez
---
libmultipath/hwtable.c | 106 -
1 file changed, 51 insertions(+), 55 deletions(-)
diff --git a/libmultipath/hwtable.c
Fixes this warning from clang:
main.c:628:11: warning: variable 'reply' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
...
main.c:609:32: note: initialize the variable 'reply' to silence this warning
Fixes: 506d253b7f89 "multipath: delegate dangerous commands to
By default, "make" removes intermediate files from implicit rules
if they are the only dependency. Prevent that by using .SECONDARY.
Otherwise some files will be re-built upon second invocation of "make".
Fixes: e39283ebd79b "multipath-tools: add dependency tracking to Makefiles"
Reported-by: Xose
Fixes: "multipathd: release uxsocket and resource when cancel thread"
Signed-off-by: Martin Wilck
---
multipathd/uxlsnr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c
index 0531061912b3..cdafd82943e7 100644
--- a/multipathd/uxls
On Wed, 2018-03-07 at 23:30 +0100, Xose Vazquez Perez wrote:
> On 03/07/2018 10:16 PM, Martin Wilck wrote:
>
> > On Wed, 2018-03-07 at 17:40 +0100, Xose Vazquez Perez wrote:
> > > Hi,
> > >
> > > It has to type "make" *twice* to build the full
> > > source code.
> >
> > Hm, strange. I need to do
On 03/07/2018 10:16 PM, Martin Wilck wrote:
> On Wed, 2018-03-07 at 17:40 +0100, Xose Vazquez Perez wrote:
>> Hi,
>>
>> It has to type "make" *twice* to build the full
>> source code.
>
> Hm, strange. I need to double check. It doesn't happen with my tree
> AFAICS.
These are removed by "make":
rm
On Wed, 2018-03-07 at 17:40 +0100, Xose Vazquez Perez wrote:
> Hi,
>
> It has to type "make" *twice* to build the full
> source code.
Hm, strange. I need to double check. It doesn't happen with my tree
AFAICS.
>
> And new warnings:
>
> 2 gcc warnings ===
> make[1]: Entering directory '/ho
On Tue, Mar 06, 2018 at 12:15:07AM +0100, Martin Wilck wrote:
> multipathd is supposed to block all signals in all threads, except
> the uxlsnr thread which handles termination and reconfiguration
> signals (SIGUSR1) in its ppoll() call, SIGUSR2 in the waiter thread
> and the marginal path checker
On Tue, Mar 06, 2018 at 12:15:06AM +0100, Martin Wilck wrote:
> The previous patch "libmultipath: don't update path groups when printing"
> removed the call to path_group_prio_update() in the printing code path.
> To compensate for that, recalculate path group prio also when it's not
> strictly nec
On Tue, Mar 06, 2018 at 12:15:05AM +0100, Martin Wilck wrote:
> implement display of path information for NVMe foreign paths and maps.
> With this patch, I get output like this for Linux NVMe soft targets:
>
> nvme-submultipathd show topology
> sys0:NQN:subsysname (uuid.96926ba3-b207-437c-902c-4a4
On Tue, Mar 06, 2018 at 12:15:04AM +0100, Martin Wilck wrote:
> Call into the foreign library code when paths are discovered, uevents
> are received, and in the checker loop. Furthermore, use the foreign
> code to print information in the "multipathd show paths", "multipathd
> show maps", and "mult
On Tue, Mar 06, 2018 at 12:15:03AM +0100, Martin Wilck wrote:
> Use the "foreign" code to print information about multipath maps
> owned by foreign libraries in print mode (multipath -ll, -l).
>
> Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
> ---
> multipath/main.c | 13 ++
On Tue, Mar 06, 2018 at 12:15:02AM +0100, Martin Wilck wrote:
> This actually enables the use of foreign paths.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> libmultipath/discovery.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/libmult
On Tue, Mar 06, 2018 at 12:15:01AM +0100, Martin Wilck wrote:
> This still contains stubs for path handling and checking, but it's functional
> for printing already.
>
Reviewed-by: Benjamin Marzinski
> Signed-off-by: Martin Wilck
> ---
> Makefile | 1 +
> libmultipath/f
On Tue, Mar 06, 2018 at 12:14:59AM +0100, Martin Wilck wrote:
> Add an API for "foreign" multipaths. Foreign libraries are loaded
> from ${multipath_dir}/libforeign-*.so, as we do for checkers.
>
> Refer to "foreign.h" for details about the API itself. Like we do for
> checkers, high-level multipa
On Tue, Mar 06, 2018 at 12:14:57AM +0100, Martin Wilck wrote:
> Convert higher level API (snprint_multipath_topology() etc) to
> using the generic multipath API. This will allow "foreign"
> multipath objects that implement the generic API to be printed
> exactly like native multipathd objects.
>
>
On Tue, Mar 06, 2018 at 12:14:56AM +0100, Martin Wilck wrote:
> This patch adds a simplified abstract interface to the multipath data
> structures.
> The idea is to allow "foreign" data structures to be treated by libmultipath
> if they implement the same interface. Currently, the intention is to
On Tue, 2018-03-06 at 23:56 +0100, Martin Wilck wrote:
> This series was motivated by the real-world problem that a user
> couldn't
> figure out how to write a blacklist entry for a device called '1.8"
> SSD'.
> Fixing this for good turned out to be a little tricky, therefore I
> also
> added a tes
Hi,
It has to type "make" *twice* to build the full
source code.
And new warnings:
2 gcc warnings ===
make[1]: Entering directory '/home/xose/curre/arrays/multipath-tools/multipathd'
cc -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int
-Werror=implicit-function-declaration -Werr
On Tue, 2018-03-06 at 19:21 -0600, Benjamin Marzinski wrote:
> On Tue, Mar 06, 2018 at 09:37:13PM +0100, Martin Wilck wrote:
> >
> > I'm sure this works, but have you considered achieving the same
> > result
> > simply by using create_timer with a different signal than SIGALRM?
> > Thinking about
Thanks, applied.
On Wed, Mar 7, 2018 at 2:28 PM, Xose Vazquez Perez
wrote:
> On 01/12/2018 05:56 PM, Xose Vazquez Perez wrote:
>
> > gitweb is able to extract and serve a release right away.
>
> This one is missing.
>
> > Cc: Christophe Varoqui
> > Cc: device-mapper development
> > Signed-off-
The internal usage of SIGALRM by setitimer() function may cause subtle
conflicts with other uses of SIGALRM, either by multipath-tools code itself
(e.g. lock_file()) or libc (e.g. glob()).
This patch changes the checkerloop to use an interval timer and a pthread
condition variable. No signals are
It's wrong, and unnecessary, to call pthread_kill() after
pthread_cancel(). I have observed cases where the io_err checker
thread hung in libpthread after receiving the USR2 signal, in particular
when multipathd is run under strace. (If multipathd is killed with
SIGINT under strace, and the io_erro
I noticed that the io_error checker thread accounts for most of the
activity of multipathd even if the marginal path checking paramters
are not set (which is still the default in most installations I assume).
Therefore, start the io_error checker thread only if there's at least
one map with margin
Changes wrt v2:
- 2/2: Fixed bug that would cause a crash if marginal path checker was off.
(if we don't start the thread, we'd better not kill it, either).
Martin Wilck (2):
libmultipath: fix race in stop_io_err_stat_thread
multipathd: start marginal path checker thread lazily
libm
On 01/12/2018 05:56 PM, Xose Vazquez Perez wrote:
> gitweb is able to extract and serve a release right away.
This one is missing.
> Cc: Christophe Varoqui
> Cc: device-mapper development
> Signed-off-by: Xose Vazquez Perez
> ---
> README | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletio
The FREE_CONST macro is of questionable value, as reviewers have pointed
out. The users of this macro were mostly functions that called
uevent_get_dm_xyz(). But these functions don't need to return const char*,
as they allocate the strings they return. So my change of the prototype
was wrong. This
Hi Bart,
I've finally merged the queued patches, so you can rebase this patchset
over the new head.
Thanks.
On Tue, Mar 6, 2018 at 4:25 PM, Benjamin Marzinski
wrote:
> On Thu, Mar 01, 2018 at 11:29:29AM -0800, Bart Van Assche wrote:
> > Hello Christophe,
> >
> > This series contains the follo
Hello Christophe,
On Wed, 2018-03-07 at 09:53 +0100, Christophe Varoqui wrote:
> Martin, Ben,
>
> can you update me on the status of this patchset ?
> Is it ready for inclusion ?
No. I am preparing an updated set that's much improved.
Regards
Martin
--
Dr. Martin Wilck , Tel. +49 (0)911 7405
On 2018年03月06日 13:44, Mike Snitzer wrote:
> On Mon, Mar 05 2018 at 10:35pm -0500,
> Wang Sheng-Hui wrote:
>
>> Dear,
>>
>> Sorry to trouble you.
>>
>> I noticed some code in dm-*.c like:
>> "
>> static int multipath_prepare_ioctl(struct dm_target *ti,
>> struct block_device **bdev,
Add an option to dm-verity to validate hashes at most once
to allow platforms that is CPU/memory contraint to be
protected by dm-verity against offline attacks.
The option introduces a bitset that is used to check if
a block has been validated before or not. A block can
be validated more than once
Martin, Ben,
can you update me on the status of this patchset ?
Is it ready for inclusion ?
Thanks,
Christophe
On Fri, Jan 19, 2018 at 1:29 AM, Martin Wilck wrote:
> This patch series implements the recommendation in my recent posting
> "Multipath path classification revisited". My testing has
On Wed, Mar 7, 2018 at 2:29 AM, Mike Snitzer wrote:
> On Tue, Mar 06 2018 at 4:33pm -0500,
> Arnd Bergmann wrote:
>
>> On Thu, Feb 22, 2018 at 5:04 PM, Mike Snitzer wrote:
>> > On Thu, Feb 22 2018 at 10:56am -0500,
>> > Arnd Bergmann wrote:
>>
>> >
>> > Mikulas already sent a fix for this:
>>
57 matches
Mail list logo