代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/multipath-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
author Benjamin Marzinski <bmarzins@redhat.com>
Sat, 30 Mar 2019 14:05:56 +0800 (01:05 -0500)
committer Christophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 18 Apr 2019 19:03:34 +0800 (13:03 +0200)
commit 3ad48a0bc002f3d1b2a27eafecfd7fbb390bfb94
multipathd: ignore failed wwid recheck
If disable_changed_wwids is set, when multipathd gets a change event on
a path, it verifies that the wwid hasn't changed in uev_update_path().
If get_uid() failed, uev_update_path treated this as a wwid change to 0.
This could cause paths to suddenly be dropped due to an issue with
getting the wwid. Even if get_uid() failed because the path was down,
it no change uevent happend when it later became active, multipathd
would continue to ignore the path. Also, scsi_uid_fallback() clears the
failure return if it doesn't attempt to fallback, causing get_uid()
to return success, when it actually failed.
Multipathd should neither set nor clear wwid_changed if get_uid()
returned failure. Also, scsi_uid_fallback() should retain the old return
value if it doesn't attempt to fallback.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
---
libmultipath/discovery.c | 6 +++---
multipathd/main.c | 6 ++++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 1369f38..a852843 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -1862,9 +1862,9 @@ get_vpd_uid(struct path * pp)
}
static ssize_t scsi_uid_fallback(struct path *pp, int path_state,
- const char **origin)
+ const char **origin, ssize_t old_len)
{
- ssize_t len = 0;
+ ssize_t len = old_len;
int retrigger;
struct config *conf;
@@ -1935,7 +1935,7 @@ get_uid (struct path * pp, int path_state, struct udev_device *udev)
origin = "sysfs";
}
if (len <= 0 && pp->bus == SYSFS_BUS_SCSI)
- len = scsi_uid_fallback(pp, path_state, &origin);
+ len = scsi_uid_fallback(pp, path_state, &origin, len);
}
if ( len < 0 ) {
condlog(1, "%s: failed to get %s uid: %s",
diff --git a/multipathd/main.c b/multipathd/main.c
index 872843c..49d1469 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1246,9 +1246,11 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
char wwid[WWID_SIZE];
strcpy(wwid, pp->wwid);
- get_uid(pp, pp->state, uev->udev);
+ rc = get_uid(pp, pp->state, uev->udev);
- if (strncmp(wwid, pp->wwid, WWID_SIZE) != 0) {
+ if (rc != 0)
+ strcpy(pp->wwid, wwid);
+ else if (strncmp(wwid, pp->wwid, WWID_SIZE) != 0) {
condlog(0, "%s: path wwid changed from '%s' to '%s'. %s",
uev->kernel, wwid, pp->wwid,
(disable_changed_wwids ? "disallowing" :
--
2.19.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。