On Fri, Sep 08, 2023 at 08:13:37AM +0200, Hannes Reinecke wrote:
> On 9/6/23 18:38, Nitesh Shetty wrote:
> > Before enabling copy for dm target, check if underlying devices and
> > dm target support copy. Avoid split happening inside dm target.
> > Fail early if the request needs split, currently s
On Fri, Sep 08, 2023 at 08:06:38AM +0200, Hannes Reinecke wrote:
> On 9/6/23 18:38, Nitesh Shetty wrote:
> > For the devices which does not support copy, copy emulation is added.
> > It is required for in-kernel users like fabrics, where file descriptor is
> > not available and hence they can't use
On 9/11/23 09:09, Nitesh Shetty wrote:
On Fri, Sep 08, 2023 at 08:06:38AM +0200, Hannes Reinecke wrote:
On 9/6/23 18:38, Nitesh Shetty wrote:
For the devices which does not support copy, copy emulation is added.
It is required for in-kernel users like fabrics, where file descriptor is
not avail
On 9/11/23 09:07, Nitesh Shetty wrote:
On Fri, Sep 08, 2023 at 08:13:37AM +0200, Hannes Reinecke wrote:
On 9/6/23 18:38, Nitesh Shetty wrote:
Before enabling copy for dm target, check if underlying devices and
dm target support copy. Avoid split happening inside dm target.
Fail early if the req
In preparation for implementing lockless slab shrink, use new APIs to
dynamically allocate the dm-bufio shrinker, so that it can be freed
asynchronously via RCU. Then it doesn't need to wait for RCU read-side
critical section when releasing the struct dm_bufio_client.
Signed-off-by: Qi Zheng
Revi
In preparation for implementing lockless slab shrink, use new APIs to
dynamically allocate the dm-zoned-meta shrinker, so that it can be freed
asynchronously via RCU. Then it doesn't need to wait for RCU read-side
critical section when releasing the struct dmz_metadata.
Signed-off-by: Qi Zheng
Re
On 11/09/23 09:39AM, Hannes Reinecke wrote:
On 9/11/23 09:09, Nitesh Shetty wrote:
On Fri, Sep 08, 2023 at 08:06:38AM +0200, Hannes Reinecke wrote:
On 9/6/23 18:38, Nitesh Shetty wrote:
For the devices which does not support copy, copy emulation is added.
It is required for in-kernel users lik
On Mon, Sep 11, 2023 at 08:25:05AM +0200, Martin Wilck wrote:
> On Fri, 2023-09-08 at 12:22 -0500, Benjamin Marzinski wrote:
> > On Thu, Sep 07, 2023 at 10:43:27PM +0200, Martin Wilck wrote:
> > > Our bindings list is now partially sorted, which is an improvement
> > > wrt
> > > the previous situa
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
possib
From: Martin Wilck
Factor out a trivial helper function.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 32 +++-
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/libmultipath/alias.c b/libmultipath/alias.c
index c0139a2..83ded88 100644
--- a/l
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
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 82 --
libmultipath/alias.h |
From: Martin Wilck
This way we can further improve readability of the individual test
cases.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
tests/alias.c | 92 +--
1 file changed, 46 insertions(+), 46 deletions(-)
diff --git a/
From: Martin Wilck
Use the macros introduced with the tests for get_user_friendly_alias()
also in the previously existing tests.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
tests/alias.c | 80 ---
1 file changed, 38 insertion
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
Reviewed-by: Benjamin Marzinski
---
libmultipath/configure.c | 4 ++--
libmultipath/discovery.c | 3 +++
2 files changed, 5 insertions(+), 2 deleti
From: Martin Wilck
We will use this function in a more generic way, give it a more
generic name.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libmultipath/alias.c b/libmultipath/a
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 s
From: Martin Wilck
No code changes, just moving code.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 239 ++-
1 file changed, 120 insertions(+), 119 deletions(-)
diff --git a/libmultipath/alias.c b/libmultipath/a
From: Martin Wilck
If there's a mismatch between expected and actual log message,
print both messages.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
tests/test-log.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test-log.c b/tests/test-log.c
in
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
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 12 ++-
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
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 11 +--
libmultipath/alias.h |
From: Martin Wilck
If we can assume that the bindings array is totally ordered for every
prefix, which the previous patch guarantees, the search for a free ID can be
simplified.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c | 87 ++--
1 file chang
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
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 26 +-
1 file changed, 17 inse
From: Martin Wilck
As the assignment of free aliases now relies on the bindings being
properly sorted, add some unit tests to make sure the sorting algorithm
works.
---
tests/alias.c | 212 +-
1 file changed, 209 insertions(+), 3 deletions(-)
diff
From: Martin Wilck
When I read this code, I always get confused. Adding comments to
explain the algorithm.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/libmultipath
From: Martin Wilck
Generate the man pages using the compile-time settings for paths
to multipath.conf etc.
Add a paragraph about the CONFIGDIR (/etc/multipath/conf.d)
and the drop-in configuration files in the multipath.conf man page.
Also, make sure all generated man pages and other files are
From: Martin Wilck
This way we can test the parsing of input lines from the bindings
file more easily.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 58 ++--
1 file changed, 40 insertions(+), 18 deletions(-)
dif
From: Martin Wilck
The "unsorted" test fail now, and are removed. The algorithm is now
better at finding "gaps".
Signed-off-by: Martin Wilck
---
tests/alias.c | 88 ---
1 file changed, 14 insertions(+), 74 deletions(-)
diff --git a/tests/alias.c
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
Reviewed-by: Benjamin Marzinski
---
libmultipath/devmapper.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
di
From: Martin Wilck
If some test fails with a lock held, cmocka doesn't deal well with
pthread_cleanup_pop(). Such tests can cause deadlock with the locking
primitives in the alias code, because locks don't get properly unlocked. Just
mock the lock/unlock functions and generate an error if they w
From: Martin Wilck
Signed-off-by: Martin Wilck
---
libdmmp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdmmp/Makefile b/libdmmp/Makefile
index 078eca8..172ba04 100644
--- a/libdmmp/Makefile
+++ b/libdmmp/Makefile
@@ -44,7 +44,7 @@ install:
$(DE
From: Martin Wilck
Instead of hard-conding "/etc/multipath" as the path for the state
files "bindings", "prkeys", and "wwids", make this path configurable
via the "statedir" compile-time option. The default is currently still
/etc, it might change to /var/lib or similar in the future.
Signed-off
From: Martin Wilck
Further improve test readablity.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
tests/alias.c | 178 +-
1 file changed, 76 insertions(+), 102 deletions(-)
diff --git a/tests/alias.c b/tests/alias.c
index a32b
From: Martin Wilck
The options bindings_file, wwids_file, and prkeys_file have been
deprecated since cb4d6db ("libmultipath: deprecate file and directory config
options") (multipath-tools 0.8.8). Deprecate and ignore them now.
Signed-off-by: Martin Wilck
---
libmultipath/alias.c |
From: Martin Wilck
Signed-off-by: Martin Wilck
---
tests/alias.c | 30 --
1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/tests/alias.c b/tests/alias.c
index d1cc487..8ed95d7 100644
--- a/tests/alias.c
+++ b/tests/alias.c
@@ -932,16 +932,15 @@ static
From: Martin Wilck
The name of the temp file is unlikely to be helpful for users,
and hard to predict in the unit test. Omit it.
Signed-off-by: Martin Wilck
Reviewed-by: Benjamin Marzinski
---
libmultipath/alias.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libmultip
From: Martin Wilck
Make the path to multipath.conf configurable, and use the same prefix
by default for multipath.conf and multipath/conf.d. For "usr-merged"
distributions with immutable /usr, we'll want to have the configuration
under a different prefix. This can be achieved by using e.g.
m
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 alph
From: Martin Wilck
In the error messages we print when a deprecated option is encountered,
print the compile-time value of the option.
Signed-off-by: Martin Wilck
---
libmultipath/dict.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/libmultipath/dict.c b/
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 indica
From: Martin Wilck
Signed-off-by: Martin Wilck
---
README.md | 38 ++
1 file changed, 26 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index a7f994a..679e55b 100644
--- a/README.md
+++ b/README.md
@@ -89,9 +89,17 @@ The following variable
From: Martin Wilck
Signed-off-by: Martin Wilck
---
multipath/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipath/main.c b/multipath/main.c
index 45e9745..b91289e 100644
--- a/multipath/main.c
+++ b/multipath/main.c
@@ -1025,7 +1025,7 @@ main (int argc, char *arg
From: Martin Wilck
The current sort order of aliases is alphabetical, which is does not match
the actual order of aliases, where "mpathaa" > "mpathz". Change the ordering as
follows: first sort by string length, then alphabetically. This will make
sure that for aliases with the same prefix, alias
From: Martin Wilck
Signed-off-by: Martin Wilck
---
tests/alias.c | 441 ++
1 file changed, 441 insertions(+)
diff --git a/tests/alias.c b/tests/alias.c
index 11f209e..7e443b0 100644
--- a/tests/alias.c
+++ b/tests/alias.c
@@ -81,6 +81,35 @@ int _
From: Martin Wilck
Add some logic to Makefile.inc that leads to the same result
for "prefix=" and "prefix=/", or "prefix=/usr" and "prefix=/usr/".
The logic does not work for multiple trailing slashes. It applies
to all XYZ_prefix variables in Makefile.inc.
Signed-off-by: Martin Wilck
---
Make
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
Since "libmultipath: keep bindings in memory", we don't re-read the
bindings file after every modification. Add a notification mechanism
that makes multipathd aware of changes to the bindings file. Because
multipathd itself will change the bindings file, it must compare
timesta
46 matches
Mail list logo