Blame SOURCES/0080-libmultipath-select-resize-action-even-if-reload-is-.patch

e71b65
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
e71b65
From: Benjamin Marzinski <bmarzins@redhat.com>
e71b65
Date: Tue, 31 Jan 2023 09:58:55 -0600
e71b65
Subject: [PATCH] libmultipath: select resize action even if reload is forced
e71b65
e71b65
The ACT_RESIZE action is the same as the ACT_RELOAD action, except that
e71b65
it flushes outstanding IO because the device size is changing and
e71b65
the new size might be too small for some of the outstanding IO. If we've
e71b65
detected a size change, and a forced reload is requested, we still need
e71b65
to flush the IO because the reload will change the device size.
e71b65
e71b65
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
e71b65
---
e71b65
 libmultipath/configure.c | 11 ++++++-----
e71b65
 1 file changed, 6 insertions(+), 5 deletions(-)
e71b65
e71b65
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
e71b65
index 09d7de0f..c91a8139 100644
e71b65
--- a/libmultipath/configure.c
e71b65
+++ b/libmultipath/configure.c
e71b65
@@ -769,11 +769,6 @@ void select_action (struct multipath *mpp, const struct _vector *curmp,
e71b65
 		return;
e71b65
 	}
e71b65
 
e71b65
-	if (force_reload) {
e71b65
-		mpp->force_udev_reload = 1;
e71b65
-		select_reload_action(mpp, "forced by user");
e71b65
-		return;
e71b65
-	}
e71b65
 	if (cmpp->size != mpp->size) {
e71b65
 		mpp->force_udev_reload = 1;
e71b65
 		mpp->action = ACT_RESIZE;
e71b65
@@ -782,6 +777,12 @@ void select_action (struct multipath *mpp, const struct _vector *curmp,
e71b65
 		return;
e71b65
 	}
e71b65
 
e71b65
+	if (force_reload) {
e71b65
+		mpp->force_udev_reload = 1;
e71b65
+		select_reload_action(mpp, "forced by user");
e71b65
+		return;
e71b65
+	}
e71b65
+
e71b65
 	if (!is_udev_ready(cmpp) && count_active_paths(mpp) > 0) {
e71b65
 		mpp->force_udev_reload = 1;
e71b65
 		select_reload_action(mpp, "udev incomplete");