[dm-devel] [PATCH]multipath-tools: select reservation_key parameter before PR handler for first path addition to new map

Shiva Krishna Shiva.Krishna at nimblestorage.com
Fri Feb 19 01:49:40 UTC 2016


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.

Signed-off-by: ShivaKrishna Merla <shiva.krishna at nimblestorage.com>
---
 libmultipath/configure.c |    5 ++++-
 multipathd/main.c        |    2 ++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 24ad948..2071aa4 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -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);
diff --git a/multipathd/main.c b/multipathd/main.c
index 04f6d02..bf3423f 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -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);
--

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160219/091bbf03/attachment.htm>


More information about the dm-devel mailing list