On Thu, Jul 09, 2020 at 11:24:03PM -0700, Eric Biggers wrote:
>
> I decided to make crypto_check_attr_type() return the mask instead, and do so
> via a pointer argument instead of the return value (so that we don't overload
> an
> errno return value and prevent flag 0x8000 from working).
> Ple
On Thu, Jul 09, 2020 at 03:31:26PM +1000, Herbert Xu wrote:
> Eric Biggers wrote:
> >
> > @@ -875,14 +873,21 @@ static void cbcmac_exit_tfm(struct crypto_tfm *tfm)
> >
> > static int cbcmac_create(struct crypto_template *tmpl, struct rtattr **tb)
> > {
> > + struct crypto_attr_type *algt;
>
From: Mikulas Patocka
Don't use crypto drivers that have the flag CRYPTO_ALG_ALLOCATES_MEMORY
set. These drivers allocate memory and thus they are unsuitable for block
I/O processing.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-crypt.c | 17 +++--
1 file changed, 11 insertions
From: Eric Biggers
Introduce a new algorithm flag CRYPTO_ALG_ALLOCATES_MEMORY. If this
flag is set, then the driver allocates memory in its request routine.
Such drivers are not suitable for disk encryption because GFP_ATOMIC
allocation can fail anytime (causing random I/O errors) and GFP_KERNEL
From: Eric Biggers
The flag CRYPTO_ALG_ASYNC is "inherited" in the sense that when a
template is instantiated, the template will have CRYPTO_ALG_ASYNC set if
any of the algorithms it uses has CRYPTO_ALG_ASYNC set.
We'd like to add a second flag (CRYPTO_ALG_ALLOCATES_MEMORY) that gets
"inherited"
From: Eric Biggers
seqiv_create() is pointless because it just checks that the template is
being instantiated as an AEAD, then calls seqiv_aead_create(). But
seqiv_aead_create() does the exact same check, via aead_geniv_alloc().
Just remove seqiv_create() and use seqiv_aead_create() directly.
From: Mikulas Patocka
Set the flag CRYPTO_ALG_ALLOCATES_MEMORY in the crypto drivers that
allocate memory.
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c: sun8i_ce_cipher
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c: sun8i_ss_cipher
drivers/crypto/amlogic/amlogic-gxl-core.c: meson_cipher
From: Eric Biggers
The type and mask arguments to aead_geniv_alloc() are always 0, so
remove them.
Signed-off-by: Eric Biggers
---
crypto/echainiv.c | 2 +-
crypto/geniv.c | 7 ---
crypto/seqiv.c | 2 +-
include/crypto/internal/geniv.h | 2 +-
This series introduces a flag that algorithms can set to indicate that
they allocate memory during processing of typical inputs, and thus
shouldn't be used in cases like dm-crypt where memory allocation
failures aren't acceptable.
Compared to Mikulas's patches, I've made the following improvements
From: Eric Biggers
CRYPTO_ALG_NEED_FALLBACK is handled inconsistently. When it's requested
to be clear, some templates propagate that request to child algorithms,
while others don't.
It's apparently desired for NEED_FALLBACK to be propagated, to avoid
deadlocks where a module tries to load itse
The pull request you sent on Thu, 9 Jul 2020 15:43:30 -0400:
> git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> tags/for-5.8/dm-fixes-2
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2a89b99f580371b86ae9bafd6cbeccd3bfab524a
Thank you!
--
D
Hi Linus,
The following changes since commit dcb7fd82c75ee2d6e6f9d8cc71c52519ed52e258:
Linux 5.8-rc4 (2020-07-05 16:20:22 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
tags/for-5.8/dm-fixes-2
for you to fetch change
On Thu, Jul 09, 2020 at 07:58:58AM -0600, Jens Axboe wrote:
> On 7/8/20 11:32 PM, Christoph Hellwig wrote:
> > On Wed, Jul 08, 2020 at 05:14:29PM -0600, Jens Axboe wrote:
> >> On 7/1/20 3:06 AM, Christoph Hellwig wrote:
> >>> Hi Jens,
> >>>
> >>> we have a lot of bdi congestion related code that is
On 7/8/20 11:32 PM, Christoph Hellwig wrote:
> On Wed, Jul 08, 2020 at 05:14:29PM -0600, Jens Axboe wrote:
>> On 7/1/20 3:06 AM, Christoph Hellwig wrote:
>>> Hi Jens,
>>>
>>> we have a lot of bdi congestion related code that is left around without
>>> any use. This series removes it in preparation
Hi Chongyun,
On Wed, 2020-07-08 at 01:47 +, Chongyun Wu wrote:
> Hello Martin,
> Thanks for your reply.
> Waiting for your patches I'd like to test it. And also, I'd like to
> tell more detail about this issue.
Please check out the series I just posted. Part V is what matters for
your use c
From: Martin Wilck
reload_map() is only used by multipathd. We don't have less exported
symbols though, because select_action() now needs to be exported.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 40 +---
libmultipath/configure.h | 2 +-
mu
From: Martin Wilck
This function doesn't just update the path groups. It completely
rebuilds the multipath, reloads the kernel map, and syncs path
states. That should be reflected in the function name, which should
use the term "map", like all other functions that modify kernel state.
Todo: ther
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 layer.
However, if the map was previously uninitialized, we have to force
udev t
From: Martin Wilck
Log the ioctl error messages from libdm.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 22 ---
libmultipath/devmapper.c | 61
libmultipath/devmapper.h | 4 +++
multipathd/dmevents.c| 4 ++-
multipathd/wa
From: Martin Wilck
If for a given map, if we find that the requested alias is already
used by a map with different WWID, while the map's own WWID is
not used yet, give up the alias and use the WWID instead. This
is safer than trying to destroy the existing map, which is likely
to fail.
This allo
From: Martin Wilck
Hi Christophe, hi Ben,
This is part VI of a larger patch series for multipath-tools I've been
preparing.
It's based on the previously submitted part V.
The full series will also be available here:
https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
There are tags
From: Martin Wilck
Udev may be killed after handling the ADD event for a multipath map,
but before handling the subsequent CHANGE event that populates the
udev data base with the device properties (e.g. during initrd processing).
If this happens, the ADD uevent sent during coldplug will only prov
From: Martin Wilck
This helper clears all fields of struct path (except pp->udev) that must be
re-ininitialized if the path ever is to be used again.
Signed-off-by: Martin Wilck
---
libmultipath/structs.c | 19 +--
libmultipath/structs.h | 1 +
libmultipath/structs_vec
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(-)
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 5dd37d5..8651
From: Martin Wilck
There's no point in searching for the devname first. dev_t is the primary
device property for both device mapper and udev.
Signed-off-by: Martin Wilck
---
libmultipath/dmparser.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/libmultipath/dmparse
From: Martin Wilck
Introduce a new state for pp->initialized, INIT_REMOVED. This state
means that the path is about to be removed, either by a remove uevent
or by the operator. It will normally be a very short-lived state, because
the path will be deleted from pathvec quickly after setting this s
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 +++-
1 file changed, 3 insertions(+), 64 deletions(-)
diff --git a/
From: Martin Wilck
A path in INIT_REMOVED state is only waiting for its last association
with a multipath map to be dropped. When orphan_paths() encounters
such a path, rather than orphaning it, free it.
Signed-off-by: Martin Wilck
---
libmultipath/structs_vec.c | 8 +++-
1 file changed, 7
From: Martin Wilck
If we don't do this, pathinfo() will fail on these paths, causing
adopt_paths() to fail.
Signed-off-by: Martin Wilck
---
libmultipath/structs_vec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index 7c68592..1e
From: Martin Wilck
With the previous change that avoids additions to pathvec,
the pathvec argument to disassemble_map() is const now.
Also use const for the string arguments where possible.
Signed-off-by: Martin Wilck
---
libmultipath/dmparser.c | 11 ++-
libmultipath/dmparser.h | 4 +
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.
Signed-off-by: Martin Wilck
---
multipathd/main.c | 4
1 file changed, 4 insert
From: Martin Wilck
"Empty device name" in store_path() can happen regularly and
shouldn't be logged at -v2.
Signed-off-by: Martin Wilck
---
libmultipath/structs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index 056a205..
From: Martin Wilck
Set paths belonging to a map to INIT_REMOVED state before attempting
to reload or flush the map. If the map association is successfully removed,
the path will be actually deleted, either via flush_map() -> orphan_paths(),
or in the update_multipath_strings()->sync_paths() code
From: Martin Wilck
Since the ancient commit b96dead ("[multipathd] remove the retry login in
uev_remove_path()"), update_mpp_paths() was used to check whether devices
found in disassembled maps were still in the pathvec, and to skip them
while re-assembling the new params string on reload. The re
From: Martin Wilck
After introducing update_pathvec_from_dm() in a predecessor patch,
the "layer violations" in disassemble_map() can now be removed.
I hope this clarifies program logic a little bit.
Callers need to call update_pathvec_from_dm() after disassemble_map().
Signed-off-by: Martin Wi
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
disassembled maps to the pathvec, we avoided to re-add removed paths on
future map r
From: Martin Wilck
We would fail in store_path() at the latest if pathvec was NULL.
And all callers set pathvec anyway.
Signed-off-by: Martin Wilck
---
libmultipath/dmparser.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libmultipath/dmparser.c b/libmultipath/dmpars
From: Martin Wilck
Hi Christophe, hi Ben,
This is part V of a larger patch series for multipath-tools I've been preparing.
It's based on the previously submitted part IV.
The full series will also be available here:
https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
There are tags
From: Martin Wilck
The libmpathpersist-specific function updatepaths() can be replaced
with the generic function.
Signed-off-by: Martin Wilck
---
libmpathpersist/mpath_persist.c | 54 +
1 file changed, 1 insertion(+), 53 deletions(-)
diff --git a/libmpathpersis
From: Martin Wilck
We could never be 100% certain that pp->udev was always set.
With the upcoming change, we can be even less certain. Always
check pp->udev before using it.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 11 +--
libmultipath/prioritizers/alua_r
From: Martin Wilck
If we encounter a non-existing device verify_paths(), just set
it to INIT_REMOVED state. Actual path deletion is postponed until
we don't see that path in the kernel map any more.
This allows us to get rid of the "pathvec" argument to this function.
Signed-off-by: Martin Wilc
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 special treatment
in various ways. Currently this is dealt with in disassemble_map
From: Martin Wilck
sync_paths() is the function which is called after getting kernel
state with disassemble_map(). This is the place where we should
check if paths that can eventually be deleted.
Signed-off-by: Martin Wilck
---
libmultipath/structs_vec.c | 33 +
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 after a failed
removal, which we couldn't before. Dealing with this correctly
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 paths that don't look healthy.
Signed-off-by: Martin Wilck
---
libmultipath/s
From: Martin Wilck
This code calls for a switch. Some additional compaction is possible by
observing that the code for DEV_DEVNODE, DEV_DEVT, and DEV_UEVENT is almost
the same, and factoring it out into a "common" section. Doing this with
a goto inside the switch statement is a bit unusual, but s
From: Martin Wilck
rather than 7 times in a single function. In get_refwwid(), the code that
is not run under the RCU read lock is negligible, so we might as well
keep the lock.
The "invalid" variable becomes obsolete by this change.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c |
From: Martin Wilck
If get_refwwid is called with a dev_t argument, there's no point in converting
it into a devname first. If the device doesn't exist, get_udev_device() will
fail.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 10 --
1 file changed, 4 insertions(+), 6 del
From: Martin Wilck
This was necessary with with the interspersed pthread_cleanup_push()/pop()
statements, now we can write the code more cleanly.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 31 +++
1 file changed, 11 insertions(+), 20 deletions(-)
di
From: Martin Wilck
Hi Christophe, hi Ben,
This is part IV of a larger patch series for multipath-tools I've been
preparing.
It's based on the previously submitted part III.
The full series will also be available here:
https://github.com/mwilck/multipath-tools/tree/ups/submit-2007
There are ta
From: Martin Wilck
In path_discover(), it's actually expected that a the path to be discovered is
not already in pathvec. So, do search by devt in the first place rather than
searching twice.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 32
1 file
From: Martin Wilck
The return values of get_refwwid() are the same as those of pathinfo().
So use them.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 35 ---
1 file changed, 16 insertions(+), 19 deletions(-)
diff --git a/libmultipath/configure.c b/
From: Martin Wilck
As this returns a pointer to a struct member, the return value
should also be a const char*.
Signed-off-by: Martin Wilck
---
libmultipath/config.c| 2 +-
libmultipath/config.h| 2 +-
libmultipath/configure.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
From: Martin Wilck
It's useful to sanitize these right away. We can't do this for DEV_DEVMAP,
as aliases with trailing whitespace aren't strictly forbidden, but for
the other types we can.
Signed-off-by: Martin Wilck
---
multipath/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mu
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 pathvec. As argued
for 65e1845, this might save some unnecessary work for paths w
From: Martin Wilck
pp->dev_t is the primary identifying property for both dm and udev.
Use it here, too.
Signed-off-by: Martin Wilck
---
libmultipath/structs_vec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index
From: Martin Wilck
With the previous change, we can safely assume that strchop() has been
called already where appropriate (the only caller is multipath's
configure()). We can now use const char* for the "dev" parameter.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 6 +++---
libm
From: Martin Wilck
We already avoid creating maps with empty WWID in coalesce_paths()
as well as in ev_add_path(). The only code path where it's difficult
to prove (although extremely unlikely) that we can't call
dm_addmap(ACT_CREATE) with an empty WWID is update_path_groups()->
reload_map(). To
From: Martin Wilck
If a map with given name (alias) already exists with a different WWID,
reloading it with a new WWID will be harmful. The existing paths would
be replaced by other, unrelated ones. The WWIDs of the new paths would
not match the map WWID, and thus sooner or later overwritten by
d
From: Martin Wilck
If for some reason (e.g. user configuration error) the same alias
is used for different WWIDs, multipathd starts behaving very weirdly.
Sooner or later it "fixes" pp->wwid of some paths to match those of
the other WWID, and may eventually coalesce paths with different WWIDs
int
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 different WWIDs in the WWIDs file.
It's based on the previously submitted part II.
From: Martin Wilck
This fixes this gcc error message:
error: ‘strncat’ specified bound 1 equals source length
[-Werror=stringop-overflow=]
Signed-off-by: Martin Wilck
---
libmultipath/parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/parser.c b/libmul
From: Martin Wilck
The special value 0 means "unset" for dev_loss. Make this more
explicit by using a macro.
Signed-off-by: Martin Wilck
---
libmultipath/defaults.h | 1 +
libmultipath/dict.c | 4 ++--
libmultipath/discovery.c | 12 +++-
libmultipath/propsel.c | 2 +-
4 file
From: Martin Wilck
Signed-off-by: Martin Wilck
---
tests/util.c | 63
1 file changed, 63 insertions(+)
diff --git a/tests/util.c b/tests/util.c
index 48de384..6d12fda 100644
--- a/tests/util.c
+++ b/tests/util.c
@@ -408,6 +408,68 @@ static i
From: Martin Wilck
io_err_stat_pathfail() returns an error if marginal path checking is
disabled, and on various other conditions which aren't runtime errors.
Fix that. Also, check the validity of parameters when the configuration
is read, and not on every call.
Signed-off-by: Martin Wilck
---
From: Martin Wilck
INIT_NEW is 0, but being explicit is better here.
Signed-off-by: Martin Wilck
---
libmultipath/structs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index 2dd378c..9407462 100644
--- a/libmultipath/structs.c
+++ b/libmu
From: Martin Wilck
In the update_multipath_strings() code path (disassemble_map()),
we set an empty devname if we find devices in maps that are not
in pathvec and not in sysfs. We shouldn't filter these devices
by devnode, because failure in pathinfo() causes e.g. adopt_paths()
to bail out, and t
From: Martin Wilck
clang 3.9 needs designators to accept implicit struct initialization.
Signed-off-by: Martin Wilck
---
libmultipath/checkers/directio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
inde
From: Martin Wilck
Separate these more cleanly.
Signed-off-by: Martin Wilck
---
tests/util.c | 38 +++---
1 file changed, 23 insertions(+), 15 deletions(-)
diff --git a/tests/util.c b/tests/util.c
index 7c486fc..48de384 100644
--- a/tests/util.c
+++ b/tests/uti
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 some minor fixes for dev_loss_tmo handling, mostly logging.
It's based on the previously submitted part I.
The full series will also be available here:
https://
From: Martin Wilck
This makes "bitmap" a proper bitmap, and decreases memory consumption.
Unit tests for pgpolicy.c still pass.
Signed-off-by: Martin Wilck
---
libmultipath/pgpolicies.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libmultipath/pgpolicies.c b
From: Martin Wilck
We currently log the table parameters with "load table" in domap()
in the success case. But it's at least as interesting to get this
information when domap() fails. Log in addmap() instead at v2 level.
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 2 +-
libmulti
From: Martin Wilck
Also, use some constants for both strlcpy and strlcat tests.
Signed-off-by: Martin Wilck
---
tests/util.c | 222 ---
1 file changed, 210 insertions(+), 12 deletions(-)
diff --git a/tests/util.c b/tests/util.c
index db7c05f..3c
From: Martin Wilck
Currently no libdm messages are logged at verbosity 3 and lower,
not even fatal ones. That seems wrong. Rather, we should map
our log levels (2 ~ WARN, 3 ~ NOTICE) to those of libdm
(_LOG_WARN = 4, _LOG_NOTICE = 5). Tests show that the results
are quite satisfactory for differe
From: Martin Wilck
If dev_loss_tmo can't be set because it's not supported for the
protocol at hand, let the user know.
Fixme: we could implement this for other protocols such as NVMe.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 31 ---
1 file changed
From: Martin Wilck
Users who aren't familar with the complex dependencies between
dev_loss_tmo, no_path_retry, and fast_io_fail may be confused
if their settings aren't applied. Print this log message at the
default level.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 2 +-
1 file
From: Martin Wilck
Print a more meaningful warning message, and at higher level, if
the configured dev_loss_tmo can't be applied because it conflicts
with no_path_retry.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
From: Martin Wilck
This is to be consistent with store_path_with_pathinfo(). It's not strictly
necessary; we _could_ proceed in both functions even in the unlikely case
that the device name overflows, because we use pp->dev mainly for log
messages. However, a device node name that causes an overf
From: Martin Wilck
This clutters the log. The corresponding message in lookup_binding()
doesn't have a newline, either.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 2 +-
tests/alias.c| 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/alias.
From: Martin Wilck
Signed-off-by: Martin Wilck
---
kpartx/devmapper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kpartx/devmapper.c b/kpartx/devmapper.c
index 86731ea..3efd6df 100644
--- a/kpartx/devmapper.c
+++ b/kpartx/devmapper.c
@@ -618,7 +618,7 @@ remove_partmap(co
From: Martin Wilck
This function was only called from one place. Making the dm_get_uuid
call explicit there makes the code more obvious.
Signed-off-by: Martin Wilck
---
multipathd/main.c | 14 --
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/multipathd/main.c b/mul
From: Martin Wilck
clang-3.9 doesn't like the {0} initializers for complex data structures.
Signed-off-by: Martin Wilck
---
tests/directio.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/tests/directio.c b/tests/directio.c
index 66aaf0e..989
From: Martin Wilck
TL;DR: this code is obsolete.
The failback code uses the udev 'RUN+="socket:"' technique, which
has been deprecated since udev 178 and removed since udev 183,
in 2012. The corresponding udev rule in multipath-tools has been removed
in ad067ac ("multipath: do not install rules
From: Martin Wilck
Add "const" qualifiers where appropriate.
Signed-off-by: Martin Wilck
---
libmultipath/blacklist.c | 34 +++---
libmultipath/blacklist.h | 17 +++--
2 files changed, 30 insertions(+), 21 deletions(-)
diff --git a/libmultipath/blacklis
From: Martin Wilck
... for the hwtable argument.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 5d4bf7d..c692026 100644
--- a/libmultipath/discov
From: Martin Wilck
Most of the symbols in uevent.c can be converted to static linkage.
alloc_uevent() and uevent_get_wwid() are called in the unit test
and added to the header file.
Signed-off-by: Martin Wilck
---
libmultipath/uevent.c | 45 ---
libmulti
From: Martin Wilck
If WWID determination by uid_attribute fails, and no fallback
is available, multipath(d) print two error messages:
"failed to get udev uid" and "failed to get unknown uid".
That's confusing and unnecessary. Print only the udev message.
If the fallback is available, this will re
From: Martin Wilck
Signed-off-by: Martin Wilck
---
kpartx/kpartx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index c24ad6d..5f59e15 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -635,6 +635,8 @@ main(int argc, char **argv){
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
libmultipath/util.h | 4 ++--
2 files changed, 14 insertions(
From: Martin Wilck
Two tests skipped because they fail, will be fixed with the following
patch.
Signed-off-by: Martin Wilck
---
tests/Makefile | 3 +-
tests/devt.c | 194 +
2 files changed, 196 insertions(+), 1 deletion(-)
create mode 100644
From: Martin Wilck
... in sysfs_get_tgt_nodename().
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index aa5942c..1039fc4 100644
--- a/libmultipath/discovery.c
+++
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 and a
find_first_set() method.
Use this in coalesce_paths(), and adapt the
From: Martin Wilck
strchop() returns size_t, so have it work with size_t, too. Also,
avoid the unnecessary second call to strlen().
Signed-off-by: Martin Wilck
---
libmultipath/util.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/util.c b/libmultipath/u
From: Martin Wilck
"node" is too generic to be understood without checking the code.
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index c692026..2e559d8 100644
--
From: Martin Wilck
Replace the hand-written code by a simple libudev call. The two
previously skipped tests can now be enabled again.
Signed-off-by: Martin Wilck
---
libmultipath/util.c | 87 ++---
libmultipath/util.h | 2 +-
tests/devt.c| 2 --
From: Martin Wilck
Export rather the not-quite-as-trivial getter functions, and
convert the accessors to inline wrappers.
Signed-off-by: Martin Wilck
---
libmultipath/uevent.c | 34 ++
libmultipath/uevent.h | 41 +++--
2 files
From: Martin Wilck
Hi Christophe, hi Ben,
This is part I of a larger patch series for multpath-tools I've been preparing.
It contains self-contained fixes and cleanups, and unit test additions.
The full series will also be available here:
https://github.com/mwilck/multipath-tools/tree/ups/submi
From: Martin Wilck
Rather than hand-coding the device enumeration, use udev as we do elsewhere,
too. While at it, improve the overflow detection.
Signed-off-by: Martin Wilck
---
libmultipath/print.c | 75
libmultipath/print.h | 2 +-
2 files change
From: Martin Wilck
Use "const" for function arguments where possible.
Signed-off-by: Martin Wilck
---
libmultipath/dmparser.c | 2 +-
libmultipath/util.c | 12 ++--
libmultipath/util.h | 10 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/libmultipa
From: Martin Wilck
For function parameters, cmocka's check_expected() API should be used
rather than will_return() / mock_type().
Signed-off-by: Martin Wilck
---
tests/test-log.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tests/test-log.c b/tests/test-log.c
index
1 - 100 of 103 matches
Mail list logo