代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/open-iscsi 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 93d217ce22e7668abfc5e6dbc015b37b20174b09 Mon Sep 17 00:00:00 2001
From: huangkaibin <huangkaibin@huawei.com>
Date: Fri, 19 Jan 2018 03:00:17 +0800
Subject: [PATCH] iscsid: Do not sync session when a session is already created
for a remote device
Do not sync session when a session is already created for a remote device
1. In the following scenarios, two or more sessions will be created and open for one remote device
a) two or more sync sessions are requested from the sync process for the same remote device.
this may occur when iscsid is restarted, one is requested by the previous started sync process but not handled, and another
is requested by the newly started sync process.
b) one is created in sync session, the other is created in __session_login_task.
2. If two or more sessions are created for one remote device, and there are connection problems on the remote device,
these sessions will be reopen again, and will cause one to close the connection while the other to set param for the remote device
in kernel, and will cause kernel to panic.
3. this patch fix this problem by not sync session when a session is already created for a remote device
---
usr/initiator.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/usr/initiator.c b/usr/initiator.c
index 60bd2b7..4a48bf5 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -2097,11 +2097,18 @@ iscsi_sync_session(node_rec_t *rec, queue_task_t *qtask, uint32_t sid)
iscsi_session_t *session;
struct iscsi_transport *t;
int err;
+ int nr_found;
t = iscsi_sysfs_get_transport_by_name(rec->iface.transport_name);
if (!t)
return ISCSI_ERR_TRANS_NOT_FOUND;
+ nr_found = session_find_by_rec(rec);
+ if(nr_found > 0) {
+ log_error("session is already created. sid: %d, name: %s.\n", sid, rec->name);
+ return ISCSI_ERR_SESS_EXISTS;
+ }
+
session = __session_create(rec, t, &err);
if (!session)
return ISCSI_ERR_LOGIN;
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。