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