Additional prkeys work
Benjamin Marzinski
maintainercover Additional prkeys work
These are the changes from the v3 version of my prkeys patches, since that version is already upstream.
Benjamin Marzinski (2):
mpathpersist: Fix invalid condition check
multipath: add man page info for my prkey changes
libmpathpersist/mpath_persist.c | 5 +++-- multipath/multipath.conf.5 | 17 +++++++++++++++++ multipathd/multipathd.8 | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
Benjamin Marzinski
maintainerPATCH 1/2 mpathpersist: Fix invalid condition check
In commit 1990257c (mpathpersist: add support for prkeys file), the check to see if mpathpersist needed to tell multipathd to update a device's prkey was wrong. It had a typo that made it evaluate to true for any service action, instead of just for registrations. This is the correct check.
Signed-off-by Benjamin Marzinski <[email protected]>
--- libmpathpersist/mpath_persist.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
libmpathpersist/mpath_persist.c +3 -2
@@ -339,8 +339,9 @@ int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,memcpy (&prkey, paramp->sa_key,8 );if (mpp->prkey_source ==PRKEY_SOURCE_FILE && prkey && - ((!get_be64 (mpp->reservation_key) &&MPATH_PROUT_REG_SA ) || -MPATH_PROUT_REG_IGN_SA )) { + ((!get_be64 (mpp->reservation_key) && + rq_servact ==MPATH_PROUT_REG_SA ) || + rq_servact ==MPATH_PROUT_REG_IGN_SA )) {memcpy (&mpp->reservation_key, paramp->sa_key,8 );if (update_prkey (alias,get_be64 (mpp->reservation_key))) { condlog(0, "%s: failed to set prkey for multipathd.",
Signature · 1 line
2.7.4
Benjamin Marzinski
maintainerPATCH 2/2 multipath: add man page info for my prkey changes
In reply to Benjamin MarzinskiUpdate the man pages to list the new configuration options and multipathd commands.
Signed-off-by Benjamin Marzinski <[email protected]>
--- multipath/multipath.conf.5 | 17 +++++++++++++++++ multipathd/multipathd.8 | 16 ++++++++++++++++ 2 files changed, 33 insertions(+)
multipath/multipath.conf.5 +17 -0
@@ -682,6 +682,17 @@ The default is: \fB/etc/multipath/wwids\fR . . .TP +.B prkeys_file +The full pathname of the prkeys file, which is used by multipathd to keep +track of the persistent reservation key used for a specific WWID, when +\fIreservation_key\fR is set to \fBfile\fR. +.RS +.TP +The default is \fB/etc/multipath/prkeys\fR +.RE +. +. +.TP .B log_checker_err If set to .I once
@@ -703,6 +714,12 @@ the same as the RESERVATION KEY field of the PERSISTENT RESERVE OUT parameter list which contains an 8-byte value provided by the application client to the device server to identify the I_T nexus. .RS +.PP +Alternatively, this can be set to \fBfile\fR, which will store the RESERVATION +KEY registered by mpathpersist in the \fIprkeys_file\fR. multipathd will then +use this key to register additional paths as they appear. When the +registration is removed, the RESERVATION KEY is removed from the +\fIprkeys_file\fR. .TP The default is: \fB<unset>\fR .RE
multipathd/multipathd.8 +16 -0
@@ -247,6 +247,22 @@ Disable persistent reservation management on $map. Get the current persistent reservation management status of $map. . .TP +.B map|multipath $map getprkey +Get the current persistent reservation key associated with $map. +. +.TP +.B map|multipath $map setprkey key $key +Set the persistent reservation key associated with $map to $key in the +\fIprkeys_file\fR. This key will only be used by multipathd if +\fIreservation_key\fR is set to \fBfile\fR in \fI/etc/multipath.conf\fR. +. +.TP +.B map|multipath $map unsetprkey +Remove the persistent reservation key associated with $map from the +\fIprkeys_file\fR. This will only unset the key used by multipathd if +\fIreservation_key\fR is set to \fBfile\fR in \fI/etc/multipath.conf\fR. +. +.TP .B quit|exit End interactive session. .
Signature · 1 line
2.7.4