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

8b67ad
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8b67ad
From: Benjamin Marzinski <bmarzins@redhat.com>
8b67ad
Date: Tue, 31 Jan 2023 09:58:55 -0600
8b67ad
Subject: [PATCH] libmultipath: select resize action even if reload is forced
8b67ad
8b67ad
The ACT_RESIZE action is the same as the ACT_RELOAD action, except that
8b67ad
it flushes outstanding IO because the device size is changing and
8b67ad
the new size might be too small for some of the outstanding IO. If we've
8b67ad
detected a size change, and a forced reload is requested, we still need
8b67ad
to flush the IO because the reload will change the device size.
8b67ad
8b67ad
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
8b67ad
---
8b67ad
 libmultipath/configure.c | 13 +++++++------
8b67ad
 1 file changed, 7 insertions(+), 6 deletions(-)
8b67ad
8b67ad
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
8b67ad
index 6e06fea2..ecf24f95 100644
8b67ad
--- a/libmultipath/configure.c
8b67ad
+++ b/libmultipath/configure.c
8b67ad
@@ -734,17 +734,18 @@ select_action (struct multipath * mpp, vector curmp, int force_reload)
8b67ad
 		return;
8b67ad
 	}
8b67ad
 
8b67ad
-	if (force_reload) {
8b67ad
+	if (cmpp->size != mpp->size) {
8b67ad
 		mpp->force_udev_reload = 1;
8b67ad
-		mpp->action = ACT_RELOAD;
8b67ad
-		condlog(3, "%s: set ACT_RELOAD (forced by user)",
8b67ad
+		mpp->action = ACT_RESIZE;
8b67ad
+		condlog(3, "%s: set ACT_RESIZE (size change)",
8b67ad
 			mpp->alias);
8b67ad
 		return;
8b67ad
 	}
8b67ad
-	if (cmpp->size != mpp->size) {
8b67ad
+
8b67ad
+	if (force_reload) {
8b67ad
 		mpp->force_udev_reload = 1;
8b67ad
-		mpp->action = ACT_RESIZE;
8b67ad
-		condlog(3, "%s: set ACT_RESIZE (size change)",
8b67ad
+		mpp->action = ACT_RELOAD;
8b67ad
+		condlog(3, "%s: set ACT_RELOAD (forced by user)",
8b67ad
 			mpp->alias);
8b67ad
 		return;
8b67ad
 	}