代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/multipath-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From eab6fcf772e91a16428e0f3262e6b4ef81705f79 Mon Sep 17 00:00:00 2001
From: sunguoshuai <sunguoshuai@huawei.com>
Date: Tue, 22 Jan 2019 21:29:56 -0500
Subject: [PATCH] multipathd: disable queueing for recreated map in
uev_remove_map
reason:disable queueing for recreated map in uev_remove_map
---
multipathd/main.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 8baf9ab..23fb9d4 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -674,7 +674,7 @@ uev_add_map (struct uevent * uev, struct vectors * vecs)
char *alias;
int major = -1, minor = -1, rc;
- condlog(3, "%s: add map (uevent)", uev->kernel);
+ condlog(2, "%s: add map (uevent)", uev->kernel);
alias = uevent_get_dm_name(uev);
if (!alias) {
condlog(3, "%s: No DM_NAME in uevent", uev->kernel);
@@ -793,7 +793,26 @@ uev_remove_map (struct uevent * uev, struct vectors * vecs)
uev->kernel, mpp->alias, alias);
goto out;
}
-
+ /*
+ * There may be a race window here:
+ * 1. all paths gone, causing map flushed both from multipathd and kernel
+ * 2. paths regenerated, causing multipathd creating the map again.
+ * 1 will generate a remove uevent which can be handled after 2,
+ * so we can disable queueing for the map created by 2 here temporarily
+ * and let the change uevent (generated by 2) calling uev_add_map
+ * ->setup_multipath to set queueing again. This can prevent
+ * the deadlock in this race window.
+ *
+ * The possible deadlock is: all udevd workers hangs in
+ * devices because of queue_if_no_path, so no udevd workers
+ * can handle new event and since multipathd will remove the map,
+ * the checkerloop cannot check this map's retry tick timeout
+ * and cancel the io hang which makes the udevd worker hang forever.
+ * multipathd cannot receive any uevent from udevd because all
+ * udevd workers hang there so the map cannot be recreated
+ * again which makes a deadlock.
+ */
+ dm_queue_if_no_path(alias, 0);
remove_map_and_stop_waiter(mpp, vecs);
out:
lock_cleanup_pop(vecs->lock);
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。