Update to the head of the upstream staging branch * Previous patches 0001-0032 are intlcude in the source tarball * Patches 0001-0010 are from the upstream staging branch Rename redhat patches * Previous patches 0033-0044 are not patches 0011-0022 Add dependency on libmount
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Mon, 2 Jan 2023 12:39:36 +0100
|
|
Subject: [PATCH] libmpathpersist: use conf->timeout for updating persistent
|
|
reservations
|
|
|
|
On systems with many LUNs, multipathd may fail to respond within the
|
|
default timeout to a "setprkey" command because the vecs lock is held
|
|
by the path checker. Honor the globally configured uxsock timeout in
|
|
libmpathpersist.
|
|
|
|
Reported-by: boposki (github.com/opensvc/multipath-tools/pull/58)
|
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
|
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmpathpersist/mpath_updatepr.c | 11 ++++++++++-
|
|
1 file changed, 10 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/libmpathpersist/mpath_updatepr.c b/libmpathpersist/mpath_updatepr.c
|
|
index 4529a82b..36bd777e 100644
|
|
--- a/libmpathpersist/mpath_updatepr.c
|
|
+++ b/libmpathpersist/mpath_updatepr.c
|
|
@@ -14,6 +14,9 @@
|
|
#include <mpath_persist.h>
|
|
#include "debug.h"
|
|
#include "mpath_cmd.h"
|
|
+#include "vector.h"
|
|
+#include "globals.h"
|
|
+#include "config.h"
|
|
#include "uxsock.h"
|
|
#include "mpathpr.h"
|
|
|
|
@@ -24,6 +27,12 @@ static int do_update_pr(char *alias, char *cmd, char *key)
|
|
char str[256];
|
|
char *reply;
|
|
int ret = 0;
|
|
+ int timeout;
|
|
+ struct config *conf;
|
|
+
|
|
+ conf = get_multipath_config();
|
|
+ timeout = conf->uxsock_timeout;
|
|
+ put_multipath_config(conf);
|
|
|
|
fd = mpath_connect();
|
|
if (fd == -1) {
|
|
@@ -41,7 +50,7 @@ static int do_update_pr(char *alias, char *cmd, char *key)
|
|
mpath_disconnect(fd);
|
|
return -1;
|
|
}
|
|
- ret = recv_packet(fd, &reply, DEFAULT_REPLY_TIMEOUT);
|
|
+ ret = recv_packet(fd, &reply, timeout);
|
|
if (ret < 0) {
|
|
condlog(2, "%s: message=%s recv error=%d", alias, str, errno);
|
|
ret = -1;
|