Skip to content

Additional fixes and cleanups

Benjamin Marzinski dm-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14limpathpersist: remove update_map_pr code for NULL pplibmpathpersist/mpath_persist_int.c+1 -110 replies
2/14libmpathpersist: move update_map_pr to multipathdlibmpathpersist/libmpathpersist.version libmpathpersist/mpath_persist_int.c libmpathpersist/mpath_persist_int.h +1 more+75 -770 replies
3/14multipathd: clean up update_map_pr and mpath_pr_event_handlemultipathd/main.c+24 -450 replies
4/14libmpathpersist: clean up duplicate function declarationslibmpathpersist/mpath_persist_int.h libmpathpersist/mpath_pr_ioctl.c mpathpersist/main.c+3 -100 replies
5/14multipathd: wrap setting and unsetting prflagmultipathd/cli_handlers.c multipathd/main.c multipathd/main.h+27 -200 replies
6/14multipathd: unregister PR key when path is restored if necessarylibmultipath/structs.h multipathd/main.c+37 -110 replies
7/14libmpathpersist: Fix-up reservation_key checkinglibmpathpersist/mpath_persist_int.c+36 -160 replies
8/14libmpathpersist: change how reservation conflicts are handledlibmpathpersist/mpath_persist_int.c+45 -260 replies
9/14libmpathpersist: Clear prkey in multipathd before unregisteringlibmpathpersist/mpath_persist_int.c+3 -40 replies
10/14libmpathpersist: only clear the key if we are using the prkeys filelibmpathpersist/mpath_persist_int.c+2 -13 replies
11/14libmpathpersist: Restore old reservation key on failurelibmpathpersist/mpath_persist_int.c+9 -10 replies
12/14libmpatpersist: update reservation key before checking pathslibmpathpersist/mpath_persist_int.c+28 -413 replies
13/14libmpathpersist: retry on conflicts in mpath_prout_commonlibmpathpersist/mpath_persist_int.c libmpathpersist/mpath_pr_ioctl.c+14 -20 replies
14/14libmpathpersist: Don't always fail registrations for retryable errorslibmpathpersist/mpath_persist_int.c+63 -70 replies

Reviews trailers per patch

1 of 14 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMartin Wilck
SeriesR-b
1/14
2/14
3/14
4/14
5/14
6/14
7/14
8/14
9/14
10/14R-b
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/14] Additional fixes and cleanups

This patchset builds on top of my previous libmpathpersist patchset, ("Improve mpathpersist's unavailable path handling") and add various fixes and cleanups to multipath's persistent reservation handling.

The issues handled by this patchset are:
- Handling removal of keys from paths that were down when the multipath device was unregistered.
- Changing how conflicts on key registration are handled. Instead of the current rollback method (which was broken anyways), libmpathpersist now retrys with REGISTER AND IGNORE, as long as the REGISTER command completed successfully down some of the paths.
- Changing when the reservation key is set to fix corner cases on failure and registration while paths are coming up.
- Retrying on conflicts in mpath_prout_common to fix corner cases when a path is coming up while a doing a reserve, preempt or clear.
- Allowing registrations to succeed when there are retryable errors, if the paths are actually down.
- Fixing the reservation key validation code

I realize that a number of these fixes are dealing with races between libmpathperist and multipathd, which points to shortcomings with the current design of libmpathpersist. The code could likely be simpler and more robust if limpathpersist was a thin wrapper around commands to multipathd, which handled issuing the actual persistent reservation commands. However, we have customers that need persistent reservations working well on currently released versions of the mutipath-tools, and redesigning how the libmpathpersist library works is a much larger task, and even harder to backport. I'd like to know if people think that would be a worthwhile task for later, however.

Benjamin Marzinski (14):
limpathpersist: remove update_map_pr code for NULL pp
libmpathpersist: move update_map_pr to multipathd
multipathd: clean up update_map_pr and mpath_pr_event_handle
libmpathpersist: clean up duplicate function declarations
multipathd: wrap setting and unsetting prflag
multipathd: unregister PR key when path is restored if necessary
libmpathpersist: Fix-up reservation_key checking
libmpathpersist: change how reservation conflicts are handled
libmpathpersist: Clear prkey in multipathd before unregistering
libmpathpersist: only clear the key if we are using the prkeys file
libmpathpersist: Restore old reservation key on failure
libmpatpersist: update reservation key before checking paths
libmpathpersist: retry on conflicts in mpath_prout_common
libmpathpersist: Don't always fail registrations for retryable errors

 libmpathpersist/libmpathpersist.version |   1 -
 libmpathpersist/mpath_persist_int.c     | 363 +++++++++++++-----------
 libmpathpersist/mpath_persist_int.h     |   2 -
 libmpathpersist/mpath_pr_ioctl.c        |  12 +-
 libmultipath/structs.h                  |   2 +
 mpathpersist/main.c                     |   2 -
 multipathd/cli_handlers.c               |  11 +-
 multipathd/main.c                       | 132 +++++++--
 multipathd/main.h                       |   2 +
 9 files changed, 311 insertions(+), 216 deletions(-)
Signature · 1 line
2.48.1