All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] multipath: alternative reservation_key method
@ 2017-09-08 18:45 Benjamin Marzinski
  2017-09-08 18:45 ` [PATCH 1/5] libmultipath: pull functions into util.c Benjamin Marzinski
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Benjamin Marzinski @ 2017-09-08 18:45 UTC (permalink / raw)
  To: device-mapper development; +Cc: Martin Wilck

The scsi persistent reservation API doesn't force devices to implement any
method to display the mapping from a reservation key to an I_T Nexus (the
READ_FULL_STATUS action is an optional later addition, and a number of devices
don't support it). To allow multipathd to determine the correct reservation key
for a device without support from the device itself, it uses the
reservation_key configuration option. Unfortunately, using this option forces
the multipath configuration to be updated whenever a new scsi registration key
is used.  This isn't acceptable to some users, who want a static configuration
file. I've had multiple requests to allow persistent reservations without
needing to set the reservation_key paramter beforehand.

This patch set provides an alternative method of setting the reservation_key
for the multipath device. The reservation_key configuration option now also
accepts the keyword "file". If this is used, multpath will look in the new
prkeys file (by default "/etc/multipath/prkeys") for a line with the device
wwid and it's associated reservation_key. The patches allow users to manually
set reservation_key to multipath device mappings by using the multipathd
client commands, but mpathpersist will automatically detect when devices are
configured to use the prkeys file, and will set and clear the reservation
keys automatically.

Benjamin Marzinski (5):
  libmultipath: pull functions into util.c
  libmultipath: change reservation_key to a uint64_t
  libmpathpersist: fix update_prflag code
  multipath: add alternate reservation_key method
  mpathpersist: add support for prkeys file

 libmpathpersist/mpath_persist.c  |  70 ++++++++---------
 libmpathpersist/mpath_updatepr.c |  43 ++++++----
 libmpathpersist/mpathpr.h        |   3 +-
 libmultipath/Makefile            |   2 +-
 libmultipath/byteorder.h         |  36 +++++++++
 libmultipath/checkers/rbd.c      |  16 +---
 libmultipath/config.c            |   9 ++-
 libmultipath/config.h            |   9 ++-
 libmultipath/defaults.h          |   1 +
 libmultipath/dict.c              | 106 +++++++++++++------------
 libmultipath/dict.h              |   2 +-
 libmultipath/prkey.c             | 166 +++++++++++++++++++++++++++++++++++++++
 libmultipath/prkey.h             |  19 +++++
 libmultipath/propsel.c           |  35 +++++++--
 libmultipath/structs.h           |  12 ++-
 libmultipath/util.c              |  33 ++++++++
 libmultipath/util.h              |   4 +
 multipathd/cli.c                 |   8 ++
 multipathd/cli.h                 |   8 ++
 multipathd/cli_handlers.c        |  82 +++++++++++++++++++
 multipathd/cli_handlers.h        |   3 +
 multipathd/main.c                |  26 ++----
 22 files changed, 541 insertions(+), 152 deletions(-)
 create mode 100644 libmultipath/byteorder.h
 create mode 100644 libmultipath/prkey.c
 create mode 100644 libmultipath/prkey.h

-- 
2.7.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-09-13 15:22 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-08 18:45 [PATCH 0/5] multipath: alternative reservation_key method Benjamin Marzinski
2017-09-08 18:45 ` [PATCH 1/5] libmultipath: pull functions into util.c Benjamin Marzinski
2017-09-08 20:51   ` Martin Wilck
2017-09-08 18:45 ` [PATCH 2/5] libmultipath: change reservation_key to a uint64_t Benjamin Marzinski
2017-09-08 21:09   ` Martin Wilck
2017-09-08 22:55     ` Benjamin Marzinski
2017-09-08 18:45 ` [PATCH 3/5] libmpathpersist: fix update_prflag code Benjamin Marzinski
2017-09-08 21:17   ` Martin Wilck
2017-09-08 18:45 ` [PATCH 4/5] multipath: add alternate reservation_key method Benjamin Marzinski
2017-09-08 21:34   ` Martin Wilck
2017-09-08 23:00     ` Benjamin Marzinski
2017-09-13 15:22   ` Xose Vazquez Perez
2017-09-08 18:45 ` [PATCH 5/5] mpathpersist: add support for prkeys file Benjamin Marzinski
2017-09-08 21:35   ` Martin Wilck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.