From: Martin Wilck
The previous patch "libmultipath: don't bother to recheck timeout"
causes sysfs_get_timeout() to be called less frequently. Adapt the
tests.
Signed-off-by: Martin Wilck
---
tests/test-lib.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/tests/test-lib.c
From: Martin Wilck
Rather than opening the bindings file every time we must retrieve
a binding, keep the contents in memory and write the file only
if additions have been made. This simplifies the code, and should speed up
alias lookups significantly. As a side effect, the aliases will be stored
From: Martin Wilck
Further improve test readablity.
Signed-off-by: Martin Wilck
---
tests/alias.c | 186 ++
1 file changed, 80 insertions(+), 106 deletions(-)
diff --git a/tests/alias.c b/tests/alias.c
index cb6695b..a1415c6 100644
---
From: Martin Wilck
libdevmapper will most probably not return a UUID for non-existing
maps anyway. But it's cheap to double-check here.
Signed-off-by: Martin Wilck
---
libmultipath/devmapper.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git
From: Martin Wilck
Used the macros introduced with the tests for get_user_friendly_alias()
also in the previously existing tests.
Signed-off-by: Martin Wilck
---
tests/alias.c | 80 ---
1 file changed, 38 insertions(+), 42 deletions(-)
diff
From: Martin Wilck
The different implementation of get_user_friendly_alias() and its helpers
necessitates changes in the unit tests. It would be nice if it didn't, but the
unit tests are too closely bound to the implementation to make this possible.
- The bindings table is held in memory in
From: Martin Wilck
No code changes, just moving code.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 239 ++-
1 file changed, 120 insertions(+), 119 deletions(-)
diff --git a/libmultipath/alias.c b/libmultipath/alias.c
index af2f647..5a6cdee
From: Martin Wilck
Save code and syscalls by assembling the content in memory first.
write() may return less bytes written than expected. Deal with it.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 26 +-
1 file changed, 17 insertions(+), 9 deletions(-)
diff
From: Martin Wilck
Add a variable global_bindings that holds the currently active vector of
bindings. This variable is freed at program exit.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 11 +--
libmultipath/alias.h | 1 +
From: Martin Wilck
The name of the temp file is unlikely to be helpful for uses,
and hard to predict in the unit test. Omit it.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libmultipath/alias.c
From: Martin Wilck
This way we can test the parsing of input lines from the bindings
file more easily.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 58 ++--
1 file changed, 40 insertions(+), 18 deletions(-)
diff --git a/libmultipath/alias.c
From: Martin Wilck
dm_get_uuid() will return 1 for non-existing maps. Thus we don't need
to call dm_map_present() any more in alias_already_taken(). This changes
our semantics: previously we'd avoid using an alias for which dm_get_uuid()
had failed. Now we treat failure in dm_get_uuid() as
From: Martin Wilck
If there's a mismatch between expected and actual log message,
print both messages.
Signed-off-by: Martin Wilck
---
tests/test-log.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test-log.c b/tests/test-log.c
index c174587..6351699 100644
---
From: Martin Wilck
This function just uses the file name, no other configuration
parameters. Also, pass the Bindings argument first to use the
same convention as the other functions in this file.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 12 ++--
1 file changed, 6
From: Martin Wilck
Signed-off-by: Martin Wilck
---
tests/alias.c | 531 ++
1 file changed, 531 insertions(+)
diff --git a/tests/alias.c b/tests/alias.c
index 11f209e..e2372d1 100644
--- a/tests/alias.c
+++ b/tests/alias.c
@@ -81,6 +81,35 @@ int
From: Martin Wilck
This way we can further improve readability of the individual test
cases.
Signed-off-by: Martin Wilck
---
tests/alias.c | 98 +--
1 file changed, 49 insertions(+), 49 deletions(-)
diff --git a/tests/alias.c b/tests/alias.c
From: Martin Wilck
We will use this function in a more generic way, give it a more
generic name.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/alias.c b/libmultipath/alias.c
index 0759643..af2f647
From: Martin Wilck
These functions are only called from select_alias(). The logic
is more obvious when unified in a single function.
Signed-off-by: Martin Wilck
Cc: David Bond
---
libmultipath/alias.c | 82 --
libmultipath/alias.h | 9 ++---
From: Martin Wilck
If the bindings file is changed in a way that multipathd can't handle
(e.g. by swapping the aliases of two maps), multipathd must not try
to re-use an alias that is already used by another map. Creating
or renaming a map with such an alias will fail. We already avoid
this for
From: Martin Wilck
When I read this code, I always get confused. Adding comments to
explain the algorithm.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/libmultipath/alias.c b/libmultipath/alias.c
From: Martin Wilck
This patch set contains a two-step rework of the user-friendly
names code. Patch 2-5 change the current code such that it (well, almost)
never attempts to use an alias that is currently in use by another
map. We already have some checks for this, but they don't cover all
From: Martin Wilck
"multipath -d" might change sysfs timeouts of SCSI devices.
Make sure it doesn't.
Signed-off-by: Martin Wilck
Cc: Jehan Singh
---
libmultipath/configure.c | 4 ++--
libmultipath/discovery.c | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git
From: Martin Wilck
Factor out a trivial helper function.
Signed-off-by: Martin Wilck
Cc: David Bond
---
libmultipath/alias.c | 34 --
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/libmultipath/alias.c b/libmultipath/alias.c
index
On Fri, 2023-09-01 at 18:16 +0200, Martin Wilck wrote:
> On Thu, 2023-08-31 at 16:57 -0500, Benjamin Marzinski wrote:
> > This patchset changes how prioritizers set their timeouts, to make
> > them
> > match how the checker functions work, and also cleans up some minor
> > timeout issues.
> >
> >
On Thu, 2023-08-31 at 16:57 -0500, Benjamin Marzinski wrote:
> This patchset changes how prioritizers set their timeouts, to make
> them
> match how the checker functions work, and also cleans up some minor
> timeout issues.
>
> This patchset has been entirely reworked based on suggestions from
>
25 matches
Mail list logo