From: Benjamin Marzinski <bmarzins@redhat.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>,
Martin Wilck <Martin.Wilck@suse.com>
Subject: [dm-devel] [PATCH 5/5] multipathd: don't assume mpp->paths will exist in need_switch_pathgroup
Date: Wed, 24 May 2023 18:21:12 -0500 [thread overview]
Message-ID: <1684970472-28669-6-git-send-email-bmarzins@redhat.com> (raw)
In-Reply-To: <1684970472-28669-1-git-send-email-bmarzins@redhat.com>
When need_switch_pathgroup() is called by deferred_failback_tick(),
there is a chance that mpp->paths will be NULL, even if there are paths
in the multipath device's pathgroups. Instead check if there are
multiple pathgroups, since multipath can't be using the wrong pathgroup
if there is one or none.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
multipathd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 2ea7c76b..39ba6d27 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -423,7 +423,7 @@ need_switch_pathgroup (struct multipath * mpp, int refresh, bool *need_reload)
}
}
- if (!mpp->pg || VECTOR_SIZE(mpp->paths) == 0)
+ if (VECTOR_SIZE(mpp->pg) < 2)
return 0;
bestpg = select_path_group(mpp);
--
2.17.2
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2023-05-24 23:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-24 23:21 [dm-devel] [PATCH 0/5] priority and pathgroup switching changes Benjamin Marzinski
2023-05-24 23:21 ` [dm-devel] [PATCH 1/5] libmultipath: don't count PRIO_UNDEF paths for pathgroup priority Benjamin Marzinski
2023-05-31 16:01 ` Martin Wilck
2023-05-24 23:21 ` [dm-devel] [PATCH 2/5] multipath-tools tests: add tests to verify PRIO_UDEF changes Benjamin Marzinski
2023-05-31 16:04 ` Martin Wilck
2023-05-24 23:21 ` [dm-devel] [PATCH 3/5] multipathd: refresh all priorities if one has changed Benjamin Marzinski
2023-05-31 16:27 ` Martin Wilck
2023-06-05 18:22 ` Benjamin Marzinski
2023-06-06 14:08 ` Martin Wilck
2023-06-06 15:33 ` Benjamin Marzinski
2023-05-24 23:21 ` [dm-devel] [PATCH 4/5] multipathd: reload map if the path groups are out of order Benjamin Marzinski
2023-05-31 16:27 ` Martin Wilck
2023-06-05 19:08 ` Benjamin Marzinski
2023-06-06 4:42 ` Benjamin Marzinski
2023-06-06 14:55 ` Martin Wilck
2023-06-06 15:54 ` Benjamin Marzinski
2023-06-06 16:32 ` Martin Wilck
2023-06-06 17:38 ` Benjamin Marzinski
2023-06-06 18:53 ` Martin Wilck
2023-06-06 16:39 ` Martin Wilck
2023-05-24 23:21 ` Benjamin Marzinski [this message]
2023-05-31 16:28 ` [dm-devel] [PATCH 5/5] multipathd: don't assume mpp->paths will exist in need_switch_pathgroup Martin Wilck
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=1684970472-28669-6-git-send-email-bmarzins@redhat.com \
--to=bmarzins@redhat.com \
--cc=Martin.Wilck@suse.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.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;
as well as URLs for NNTP newsgroup(s).