代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/multipath-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6c79d35c3d351323d18b63d76450fcfbb6ef5b56 Mon Sep 17 00:00:00 2001
From: sunguoshuai <sunguoshuai@huawei.com>
Date: Tue, 22 Jan 2019 22:00:35 -0500
Subject: [PATCH] Module: fix lun expansion failure when there is offline path
reason:fix lun expansion failure when there is offline path
---
libmultipath/configure.c | 11 +++++++++++
libmultipath/structs.c | 1 +
libmultipath/structs.h | 1 +
libmultipath/structs_vec.c | 1 +
4 files changed, 14 insertions(+)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 09c3dcf..1b1cc55 100644
--- a/libmultipath/configure.c
+++ b/libmultipath/configure.c
@@ -1021,6 +1021,7 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid,
}
vector_foreach_slot (pathvec, pp1, k) {
int invalid = 0;
+ condlog(3, "%s %s: start coalesce", pp1->dev, pp1->dev_t);
/* skip this path for some reason */
/* 1. if path has no unique id or wwid blacklisted */
@@ -1053,6 +1054,12 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid,
orphan_path(pp1, "only one path");
continue;
}
+ /* if path is handled before */
+ if (pp1->handled) {
+ condlog(3, "%s: skip handled path.", pp1->dev_t);
+ continue;
+ }
+
/*
* at this point, we know we really got a new mp
@@ -1071,6 +1078,10 @@ int coalesce_paths (struct vectors * vecs, vector newmp, char * refwwid,
for (i = k + 1; i < VECTOR_SIZE(pathvec); i++) {
pp2 = VECTOR_SLOT(pathvec, i);
+ if (pp2->handled)
+ continue;
+
+
if (strcmp(pp1->wwid, pp2->wwid))
continue;
diff --git a/libmultipath/structs.c b/libmultipath/structs.c
index ae847d6..99435c1 100644
--- a/libmultipath/structs.c
+++ b/libmultipath/structs.c
@@ -100,6 +100,7 @@ alloc_path (void)
pp->fd = -1;
pp->tpgs = TPGS_UNDEF;
pp->priority = PRIO_UNDEF;
+ pp->handled = 0;
checker_clear(&pp->checker);
dm_path_to_gen(pp)->ops = &dm_gen_path_ops;
pp->hwe = vector_alloc();
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
index 0a2623a..d667cb7 100644
--- a/libmultipath/structs.h
+++ b/libmultipath/structs.h
@@ -277,6 +277,7 @@ struct path {
struct checker checker;
struct multipath * mpp;
int fd;
+ int handled;
int initialized;
int retriggers;
int wwid_changed;
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index f87d69d..fba38c0 100644
--- a/libmultipath/structs_vec.c
+++ b/libmultipath/structs_vec.c
@@ -388,6 +388,7 @@ int verify_paths(struct multipath *mpp, struct vectors *vecs)
return 0;
vector_foreach_slot (mpp->paths, pp, i) {
+ pp->handled = 1;
/*
* see if path is in sysfs
*/
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。