diff mbox series

[04/13] libmultipath: remove need_reload check from select_action

Message ID 20250123031643.3017891-5-bmarzins@redhat.com (mailing list archive)
State Not Applicable, archived
Delegated to: Benjamin Marzinski
Headers show
Series fix for GitHub issue #108 and misc cleanups | expand

Commit Message

Benjamin Marzinski Jan. 23, 2025, 3:16 a.m. UTC
select_action() is only called by coalesce_paths() to determine what
action to take. The only function that sets mpp->need_reload is
update_pathvec_from_dm() and it only sets need_reload if there is a
problem with the current device layout. If coalesce_paths() generates
the same device layout for the new device, then forcing a reload will
not make any difference, since nothing will change. If it generates
a different device layout, then it will reload the device regardless
of the need_reload value.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
 libmultipath/configure.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox series

Patch

diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 534ca7f4..ac5e6713 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -686,8 +686,6 @@  void select_action (struct multipath *mpp, const struct vector_s *curmp,
 	mpp->action = ACT_NOTHING;
 	cmpp = find_mp_by_wwid(curmp, mpp->wwid);
 	cmpp_by_name = find_mp_by_alias(curmp, mpp->alias);
-	if (mpp->need_reload || (cmpp && cmpp->need_reload))
-		force_reload = 1;
 
 	if (!cmpp) {
 		if (cmpp_by_name) {