[dm-devel] [PATCH 5/5] add prflag to path
Martin Wilck
mwilck at suse.com
Thu Nov 18 15:36:41 UTC 2021
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
More information about the dm-devel
mailing list