代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/multipath-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From aa3dbb9a4c7ba220139801533a27d99542d4e909 Mon Sep 17 00:00:00 2001
From: sunguoshuai <sunguoshuai@huawei.com>
Date: Wed, 23 Jan 2019 02:21:31 -0500
Subject: [PATCH] fix change reservation key to uint8 for
memcmp
reason:fix change reservation key to uint8 for memcmp
---
libmpathpersist/mpath_persist.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index 691b4e1..a2907db 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/libmpathpersist/mpath_persist.c
@@ -263,6 +263,9 @@ int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
int ret;
uint64_t prkey;
struct config *conf;
+ uint8_t uitmp[8] = {0};
+ uint64_t uireservation = {0};
+ int j;
conf = get_multipath_config();
conf->verbosity = verbose;
@@ -353,8 +356,15 @@ int mpath_persistent_reserve_out ( int fd, int rq_servact, int rq_scope,
}
}
- if (memcmp(paramp->key, &mpp->reservation_key, 8) &&
- memcmp(paramp->sa_key, &mpp->reservation_key, 8)) {
+ uireservation = get_be64(mpp->reservation_key);
+ for (j = 7; j >= 0; --j) {
+ uitmp[j] = (uireservation & 0xff);
+ uireservation >>= 8;
+ }
+
+ if (memcmp(paramp->key, uitmp, 8) &&
+ memcmp(paramp->sa_key, uitmp, 8)) {
+
condlog(0, "%s: configured reservation key doesn't match: 0x%" PRIx64, alias, get_be64(mpp->reservation_key));
ret = MPATH_PR_SYNTAX_ERROR;
goto out1;
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。