Skip to contentSkip to conversation

multipath-tools: select reservation_key parameter before PR handler for first path addition to new map

PATCH New Shiva Krishna 1 participant 1 message Feb 19, 2016 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: select reservation_key parameter before PR handler for first path addition to new map

On addition of first path, reservation_key parameter is not selected before handling persistent reservations. This leads multipathd to not perform registration on the path even when registrations exist on the LUN.

Added code to select "reservation_key" parameter value before calling PR handler during addition of new path to a new map.

---
 libmultipath/configure.c |    5 ++++-
 multipathd/main.c        |    2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)
libmultipath/configure.c +4 -1
index 24ad948..2071aa4 100644
@@ -287,7 +287,10 @@ setup_map (struct multipath * mpp, char * params, int params_size)
  select_gid(mpp);
  select_fast_io_fail(mpp);
  select_dev_loss(mpp);
- select_reservation_key(mpp);
+
+ if (!mpp->reservation_key)
+ select_reservation_key(mpp);
+
  select_retain_hwhandler(mpp);
  select_deferred_remove(mpp);
  select_delay_watch_checks(mpp);
multipathd/main.c +2 -1
index 04f6d02..bf3423f 100644
@@ -539,6 +539,8 @@ rescan:
  goto fail; /* leave path added to pathvec */
  }
 
+ /* select configured reservation key */
+ select_reservation_key(mpp);
  /* persistent reseravtion check*/
  mpath_pr_event_handle(pp);
--