Instead of pp->offline being a binary value, change it to show the
actual result of looking at the sysfs state, and rename it to
pp->sysfs_state. Also change the function name from path_offline() to
path_sysfs_state(). Adapt the tests for pp->offline. This should not
change how multipath currently
Split out the code that updates a path's state and sets up the next
check time into its own function, update_path().
Signed-off-by: Benjamin Marzinski
---
multipathd/main.c | 42 ++
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/multipathd
Make the directio tests work with no waiting in the libcheck_pending()
and the new libcheck_need_wait() call.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
tests/directio.c | 49 +---
1 file changed, 46 insertions(+), 3 deletions(-)
Add a new optional checker class function, libcheck_need_wait() and a
new function to call it, checker_need_wait(). This can be used to see if
a path_checker is currently running. This will be used to determine if
there are pending checkers that need to be waited for.
Signed-off-by: Benjamin Marzi
Now that multipathd can drop the vecs lock and sleep in-between when the
checker runs and when the path gets updated, it is possible for the
user to either fail or reinstate the path in this window.
If a path gets manually failed in the window between when the checker
starts and the path is update
When the tur and directio checkers start an asynchronous checker, they
now immediately return with the path in PATH_PENDING, instead of
waiting in checker_check(). Instead the wait now happens in
checker_get_state().
Additionally, the directio checker now waits for 1 ms, like the tur
checker does.
Since we just returned if newstate wasn't PATH_UP or PATH_GHOST, it
must obviously be PATH_UP or PATH_GHOST at this point in the code. We
don't even wrap all the code for dealing with a path that just came up
in this if-block, It's only the persistent resrvation code.
Reviewed-by: Martin Wilck
Si
Disable waiting in the libcheck_pending() checker class functions.
Instead, they now just check if the checker has already completed.
A future patch will re-add waiting outside of libcheck_pending().
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/checkers/directio.
If reload_and_sync_map() removes the multipath device,
deferred_failback_tick() needs to decrement the counter so that it
doesn't skip the following device.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
multipathd/main.c | 9 ++---
1 file changed, 6 insertions(+), 3 deleti
The code needs to check that pp->pgindex equals pp->mpp->bestpg and that
they aren't both 0 (which is an invalid pathgroup id). Since we're
already checking that they are equal, we only need to check one of them
to see if it's non-zero. Instead of checking if pp->pgindex is non-zero
for every path,
Multipath again waits for running checkers to complete. In pathinfo(),
mutipath will just wait 1ms if the checker is running. In checkerloop(),
if there are running checkers, multipathd will drop the vecs lock and
wait for 5ms. The difference it wait times is because multipathd cannot
drop the vecs
checker_check() is now a void function that stores the path state in
the checker struct. It can be retrieved later using checker_get_state().
Right now, this is called immediately after checker_check(), but in
the future, it can be deferred to another time.
Reviewed-by: Martin Wilck
Signed-off-by
Make the directio tests work with libcheck_pending() being separate from
libcheck_check
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
tests/directio.c | 133 +--
1 file changed, 82 insertions(+), 51 deletions(-)
diff --git a/tests/d
Instead of updating the path priorities and possibly reloading the
multipath device when each path is updated, wait till all paths
have been updated, and then go through the multipath devices updating
the priorities once, reloading if necessary.
Signed-off-by: Benjamin Marzinski
---
libmultipath
check_path_state() is now split into start_path_check(), which calls
path_sysfs_state() and if the path is up also calls start_checker(), and
get_new_state() which gets the new state from either pp->sysfs_state
or get_state().
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
mult
Move the code that starts the path checker from do_check_path() into
check_path(), rename the remainder of do_check_path() to
update_path_state() and call that from check_path().
Signed-off-by: Benjamin Marzinski
---
multipathd/main.c | 21 +++--
1 file changed, 11 insertions(+),
get_state() is now split into start_checker(), which runs the checker
but doesn't wait for async checkers, and get_state(), which returns the
state from the checker, after waiting for async checkers if necessary.
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/disco
The way that multipathd was handling priority refreshes had some issues.
Some of the multipath prioritizers can hang when run on a failed path.
Multipathd was only skipping paths in PATH_DOWN, but there are other
states where the prioritizer is also likely to hang, such as
PATH_TIMEOUT, PATH_SHAKY,
Reviewed-by: Martin Wilck
Signed-off-by: Benjamin Marzinski
---
libmultipath/checkers.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libmultipath/checkers.h b/libmultipath/checkers.h
index 6e54d8f0..fb1160af 100644
--- a/libmultipath/checkers.h
+++ b/libmultipath/checkers.h
@@ -188,6 +
Tis patchset is based on discussions I had with Martin Wilck about my
last, partially applied patchset.
The first two patches are reposts of patches from my earlier patchset,
redone to work with the new libmp_mapinfo() API. They make it possible
to add maps by WWID with "multipathd add map".
The
Instead of checking and updating each path, the checkerloop now starts
the checkers on all the paths in check_paths(), and then goes back and
updates all the paths in update_paths(). Since the async checkers use an
absolute time to wait for before returning PATH_PENDING, only one
checker actually n
This patch adds a new optional symbol for the dynamic path checker
libraries, libcheck_pending. This is currently unused, but can be called
on pending checkers to check if they've completed and return their value.
The "tur" and "directio" checkers are the only ones which can return
PATH_PENDING. Th
Split handle_uninitialized_path() into check_uninitialized_path, which
handles udev retriggers for INIT_MISSING_UDEV paths and starts the path
checker for INIT_FAILED and INIT_NEW paths, and
update_uninitialized_path() which gets the path checker result and
reruns pathinfo if the path is up.
Signe
Update description of Alletra NVMe.
Cc: Martin Wilck
Cc: Benjamin Marzinski
Cc: Christophe Varoqui
Cc: DM-DEVEL ML
Signed-off-by: Xose Vazquez Perez
---
libmultipath/hwtable.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.
On Thu, Oct 03, 2024 at 11:15:21PM +0200, Martin Wilck wrote:
> On Thu, 2024-09-12 at 17:49 -0400, Benjamin Marzinski wrote:
> > Add a new optional checker class function, libcheck_need_wait() and a
> > new function to call it, checker_need_wait(). This can be used to see
> > if
> > a path_checker
On Thu, Oct 03, 2024 at 11:00:20PM +0200, Martin Wilck wrote:
> On Thu, 2024-09-12 at 17:49 -0400, Benjamin Marzinski wrote:
> > Instead of updating the path priorities and possibly reloading the
> > multipath device when each path is updated, wait till all paths
> > have been updated, and then go
On Thu, Oct 03, 2024 at 10:41:20PM +0200, Martin Wilck wrote:
> On Thu, 2024-09-12 at 17:49 -0400, Benjamin Marzinski wrote:
> > Instead of checking and updating each path, the checkerloop now
> > starts
> > the checkers on all the paths in check_paths(), and then goes back
> > and
> > updates all
On Thu, Oct 03, 2024 at 10:23:57PM +0200, Martin Wilck wrote:
> On Thu, 2024-09-12 at 17:49 -0400, Benjamin Marzinski wrote:
> > Split out the code that updates a path's state and sets up the next
> > check time into its own function, update_path().
> >
> > Signed-off-by: Benjamin Marzinski
> > -
On Thu, Oct 03, 2024 at 10:23:51PM +0200, Martin Wilck wrote:
> Nit: the subject should refer to "do_check_path".
> Also, the word "split" is somewhat confusing as you've been using it
> for actually splitting one function into two elsewhere in this set.
>
> Perhaps just call the patch "rename do
On Mon, Oct 07, 2024 at 10:25:56AM +0200, Milan Broz wrote:
> I am talking from the security point of view. Now, dm-crypt does not trust
> storage devices. Storage devices will never see plaintext (or key).
> With inline crypto, it needs to see both.
With inline crypto as implemented right now the
On 07/10/24 01:38PM, Mikulas Patocka wrote:
Hi
Here I'm submitting a patch for this bug.
Mikulas
From: Mikulas Patocka
If blk_alloc_disk fails, the variable md->disk is set to an error value.
cleanup_mapped_device will see that md->disk is non-NULL and it will
attempt to access it, causing
31 matches
Mail list logo