Linux Device Mapper development
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: lixiaokeng <lixiaokeng@huawei.com>,
	Christophe Varoqui <christophe.varoqui@opensvc.com>,
	Benjamin Marzinski <bmarzins@redhat.com>,
	dm-devel mailing list <dm-devel@redhat.com>
Cc: linfeilong <linfeilong@huawei.com>,
	"liuzhiqiang \(I\)" <liuzhiqiang26@huawei.com>
Subject: Re: [dm-devel] [PATCH 5/5] add prflag to path
Date: Thu, 18 Nov 2021 16:36:41 +0100	[thread overview]
Message-ID: <f416a25130ecc8834ea3946bbb58151a5ccab26c.camel@suse.com> (raw)
In-Reply-To: <adf675e0-1ed6-f395-e428-548fe145ea64@huawei.com>

On Tue, 2021-11-16 at 22:01 +0800, lixiaokeng wrote:
> The update_map will frequently be called and there will be
> unnecessary checks of reseravtion. We add prflag to path
> to avoid this.
> 
> The pp->state changes from others to up or ghost, the
> mpath_pr_event_handle should be called. The
> mpath_pr_event_handle in ev_add_path may not be called,
> so set pp->prkey PRKEY_NO when path is removed.
> 
> Fix: 4db4fa
> Signed-off-by: Lixiaokeng <lixiaokeng>
> ---
>  libmpathpersist/mpath_persist.c |  2 +-
>  libmultipath/structs.c          |  1 +
>  libmultipath/structs.h          | 12 ++++++++++++
>  multipathd/cli_handlers.c       | 15 ++++++++++-----
>  multipathd/main.c               |  5 +++--
>  5 files changed, 27 insertions(+), 8 deletions(-)
> 
> diff --git a/libmpathpersist/mpath_persist.c
> b/libmpathpersist/mpath_persist.c
> index 803a2a28..f88a2e89 100644
> --- a/libmpathpersist/mpath_persist.c
> +++ b/libmpathpersist/mpath_persist.c
> 
> +/*
> + * PRFLAG_NO for path, it means reservation should be checked.
> + * PRFLAG_NO for multipath, it means mpp has no prkey.
> + * PRFLAG_OK for path, it means reservation has been checked.
> + * PRFLAG_OK for multipath, it means mpp has prkey.
> + */

Please don't use the same enum with different meanings in different
context.

Martin


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


  reply	other threads:[~2021-11-18 15:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-16 13:58 [dm-devel] [PATCH 0/5] multipath-tools series: some codeclean and add prflag to path lixiaokeng
2021-11-16 13:59 ` [dm-devel] [PATCH 1/5] Fix potential null pointer dereference lixiaokeng
2021-11-17 18:05   ` Benjamin Marzinski
2021-11-18  2:04     ` lixiaokeng
2021-11-16 13:59 ` [dm-devel] [PATCH 2/5] remove unnecessary memset lixiaokeng
2021-11-18  0:10   ` Benjamin Marzinski
2021-11-16 14:00 ` [dm-devel] [PATCH 3/5] remove unnecessary free lixiaokeng
2021-11-18  0:14   ` Benjamin Marzinski
2021-11-16 14:00 ` [dm-devel] [PATCH 4/5] Match FREE and MALLOC/STRDUP/REALLOC lixiaokeng
2021-11-18  0:47   ` Benjamin Marzinski
2021-11-18  2:46     ` lixiaokeng
2021-11-18 15:35       ` Martin Wilck
2021-11-18 15:31     ` Martin Wilck
2021-11-16 14:01 ` [dm-devel] [PATCH 5/5] add prflag to path lixiaokeng
2021-11-18 15:36   ` Martin Wilck [this message]
2021-11-18 16:57   ` Benjamin Marzinski
2021-11-19  8:41     ` lixiaokeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f416a25130ecc8834ea3946bbb58151a5ccab26c.camel@suse.com \
    --to=mwilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@redhat.com \
    --cc=linfeilong@huawei.com \
    --cc=liuzhiqiang26@huawei.com \
    --cc=lixiaokeng@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox