Move logging of minor expected behavior to INFO level. Modify the log
level of some messages by whether or not mpp->prflag changed values.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
libmpathpersist/mpath_persist_int.c | 34 +++--
1 file changed, 22 i
If registering a key on a path fails with a reservation conflict in
mpath_prout_reg(), libmpathpersist currently tries to roll back the
registration. This code doesn't always make much sense. First, it
updates the configured key, but doesn't fix it if it does a rollback.
Second, it always rolls the
mpath_prout_common() just needs to execute a prout command down one
path. If it uses a path that was down when the key was changed and has
since been restored, but multipathd hasn't noticed yet, that path will
still be using the old key. This was causing mpath_prout_common() to
fail with MPATH_PR_R
When you register or switch keys in libmpathpersist, it updates
mpp->reservation_key in multipathd before doing the registration. This
means that any paths that come online while you are doing the
registration get the new key registered. libmpathpersist didn't do
this when unregistering a key. This
The reservation key checking in do_mpath_persistent_reserve_out() was
slightly wrong. It allowed invalid keys for preempting. It now correctly
checks the reservation key for the preempt commands.
It also was a little overly strict in some places. Formerly, it only
allowed registering from any key
These will also be used by another variable, so make their name more
generic.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
libmpathpersist/mpath_persist_int.c | 16
libmpathpersist/mpath_updatepr.c| 8
libmultipath/structs.h | 9 ++
mpath_pr_event_handle() creates a separate thread to do the persistent
reservation work, but it doesn't take any advantage of the work being
done in another thread. Merge mpath_pr_event_handle() and
mpath_pr_event_handler_fn() into a single function with no separate
thread.
Signed-off-by: Benjamin
If you issue a RESERVE to a regular SCSI device that already holds the
reservation, it succeeds (and does nothing). If you issue a RESERVE to a
multipath device that already holds the reservation, it can fail with
a reservation conflict error if you issue the RESERVE to a path that isn't
holding th
It is possible that a path was unavailable and either the registered PR
key was removed or the registered PR key was changed and then that new
key was preempted. In both of these situations, this path will still
have a registered key (just not one that matches mpp->reservation_key)
but it should no
None of the calls to update_map_pr() outside of mpath_pr_event_handle()
add any benefit. When update_map_pr() is called without a path, it tries
to read the pr keys list on each usable path until it succeeds, and then
checks the keys to see if they include the configured key.
In all cases where up
The workaround for releasing a reservation held by a failed path
(clearing all persistent reservation data and then reregistering all the
keys) has several problems. It requires devices that support the READ
FULL STATUS command and are capable of specifying TransportIDs with
REGISTRATION commands (
When a SCSI device preempts its own reservation key, it will remove the
registered keys from all other devices with that reservation key, but
retain its registered key (and possibly acquire the reservation). If a
multipath device preempts its own reservation key, it will also remove
the registered
When a reservation key is changed from one non-zero value to another,
libmpathpersist checks if the old key is still holding the reservation,
and preempts it if it is. This was only safe if two nodes never share
the same key. If a node uses the same key as another node that is
holding the reservati
When you use REGISTER to change the reservation key of a registered
multipath device, where the path holding the reservation is down,
libmpathpersist will PREEMPT the failed path to move the reservation to
a usable path, so the reservation key will be updated. However, when you
use REGISTER AND IGN
mpath_send_prin_activepath() just calls prin_do_scsi_ioctl() with exactly
the same arguments that it is passed, and returns the same return. remove
it.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
libmpathpersist/mpath_persist_int.c | 14 +-
1 file changed, 1 inse
When prflag is unset, prhold and sa_flags should also be unset. A future
patch will add another variable to be set when prflag is set. Wrap all
these actions in set_pr() and unset_pr().
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
multipathd/cli_handlers.c | 10 --
mu
If none of the threads succeeds in issuing the release, simply return
failure, instead of trying the workaround.
Signed-off-by: Benjamin Marzinski
---
libmpathpersist/mpath_persist_int.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/libmpathpersist/mpath_per
Do not unset mpp->prflag in update_map_pr() unless the device doesn't
support persistent reservations or it successfully reads the registered
keys and discovers that the device's key is not there. Also, nothing in
the libmpathpersist ever returns MPATH_PR_SENSE_INVALID_OP. It instead
returns MPATH_
Change the code at the end of do_mpath_persistent_reserve_out() to
use a switch statement instead of multiple if statements. A future
patch will add more actions here, and a switch statement looks cleaner.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
libmpathpersist/mpath_per
multipathd is now the only program that calls update_map_pr(), so move
it there, and make it static. There are no other code changes.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
libmpathpersist/libmpathpersist.version | 1 -
libmpathpersist/mpath_persist_int.c | 83
Don't set ret to MPATH_PR_SUCCESS, after the code just made sure that
it was already set to MPATH_PR_SUCCESS.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
libmpathpersist/mpath_persist_int.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/libmpathpersist/mpath_persist_in
send_prout_activepath() creates a single separate thread that just calls
prout_do_scsi_ioctl() and it doesn't take any advantage of the work
being done in another thread. Remove the function and call
prout_do_scsi_ioctl() directly.
Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
---
There's an incorrect VDO_ASSERT macro usage in
start_restoring volume_index() and start_restoring_volume_sub_index(),
since assert's return value is not used anywhere.
Thus, use VDO_ASSERT_LOG_ONLY macro in such cases.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off
On Mon, 8 Sep 2025, Robert Beckett wrote:
> Hi,
>
> While testing resiliency of encrypted swap using dmcrypt we encounter easily
> reproducible deadlocks.
> The setup is a simple 1GB encrypted swap file [1] with a little mem chewer
> program [2] to consume all ram.
>
> Usually the first run
MAX_TAG_SIZE was 0x1a8 and it may be truncated in the "bi->metadata_size
= ic->tag_size" assignment. We need to limit it to 255.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-integrity.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/drivers/md/dm-integrity.c
On Fri, Sep 05, 2025 at 11:07:13PM +0200, Martin Wilck wrote:
> Coverity scan defect #488155.
>
Your fix looks fine, but the code I see right above it isn't. We should
not be returning a positive number here if things went wrong. Looking
at the udev_enumerate_new() code, we should be safe always
Hi
What if someone changes it to a larger type later? I think that if this
branch doesn't do any harm and if it protects us from memory errors
introduced by future changes, we may let it be there.
But I found another bug when looking at this - the user may set tag size
up to MAX_TAG_SIZE (that
Allocate the recalculate buffer with kmalloc rather than vmalloc. This
will be needed later, for the simplification of the asynchronous hash
interface.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-integrity.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
Index: linux-2.6/
Make sure that the "data" argument passed to integrity_sector_checksum is
always page-aligned and add an "offset" argument that specifies the
offset from the start of the page. This will enable us to use the
asynchronous hash interface later.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-inte
Rename "internal_hash" to "internal_shash" and introduce a boolean value
"internal_hash".
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-integrity.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
Index: linux-2.6/drivers/md/dm-integrity.c
This abstraction will be used later, for the asynchronous hash interface.
Signed-off-by: Mikulas Patocka
---
drivers/md/dm-integrity.c | 37 +
1 file changed, 17 insertions(+), 20 deletions(-)
Index: linux-2.6/drivers/md/dm-integrity.c
=
Hi
These patches add asynchronous hash support to dm-integrity.
Harald, please test them, I will commit them if they work for you.
Mikulas
Instead of calling digestsize() each time the digestsize for
the internal hash is needed, store the digestsize in a new
field internal_hash_digestsize within struct dm_integrity_c
once and use this value when needed.
Signed-off-by: Harald Freudenberger
Signed-off-by: Mikulas Patocka
---
drivers
33 matches
Mail list logo