Re: [PATCH 3/5] libmpathpersist: fix update_prflag code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxx>

-- 
Dr. Martin Wilck <mwilck@xxxxxxxx>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux