[dm-devel] [PATCH 61/74] libmultipath: adopt_paths(): skip removed paths
Benjamin Marzinski
bmarzins at redhat.com
Sat Jul 18 04:28:36 UTC 2020
On Thu, Jul 09, 2020 at 12:51:32PM +0200, mwilck at suse.com wrote:
> From: Martin Wilck <mwilck at suse.com>
>
> If we don't do this, pathinfo() will fail on these paths, causing
> adopt_paths() to fail.
>
This is probably unnecessary, but it seems safer to make sure that
pp->mpp is set to mpp, before bailing out on removed paths.
-Ben
> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ---
> libmultipath/structs_vec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
> index 7c68592..1e0f109 100644
> --- a/libmultipath/structs_vec.c
> +++ b/libmultipath/structs_vec.c
> @@ -79,6 +79,8 @@ int adopt_paths(vector pathvec, struct multipath *mpp)
> pp->dev, mpp->alias);
> continue;
> }
> + if (pp->initialized == INIT_REMOVED)
> + continue;
> condlog(3, "%s: ownership set to %s",
> pp->dev, mpp->alias);
> pp->mpp = mpp;
> --
> 2.26.2
More information about the dm-devel
mailing list