[dm-devel] [PATCH 3/5] libmpathpersist: fix update_prflag code
Martin Wilck
mwilck at suse.com
Fri Sep 8 21:17:56 UTC 2017
On Fri, 2017-09-08 at 13:45 -0500, Benjamin Marzinski wrote:
> There are multiple problems with the prflag code. First, it doesn't
> do
> anything useful at all currently. update_prflags is called with "set"
> and "unset" instead of "setprstatus" and "unsetprstatus", so it
> doesn't
> actually enable persistent reservation tracking in multipathd when a
> key
> is registered. Second, the string is to store the multipathd message
> is
> 64 bytes long, while just a WWID, which can be used as an alias, can
> be
> 128 bytes long, so it's possible to run out of space in the message.
> Finally, it is called by mpath_persistent_reserve_out when doing a
> preempt and abort, which doesn't make any sense. This disables
> multipathd persistent reservation tracking when a node has just taken
> over the reservation on a device.
>
> This patch fixes these issues, cleans up the return codes and
> variable
> names, and splits update_prflag into two functions, so that the bulk
> of
> the work (now in do_update_pr), can be reused by other callers.
>
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>
> ---
> libmpathpersist/mpath_persist.c | 9 ++++-----
> libmpathpersist/mpath_updatepr.c | 33 +++++++++++++++++-------------
> ---
> libmpathpersist/mpathpr.h | 2 +-
> 3 files changed, 22 insertions(+), 22 deletions(-)
>
Reviewed-by: Martin Wilck <mwilck at suse.com>
--
Dr. Martin Wilck <mwilck at suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
More information about the dm-devel
mailing list