|
|
3f3ec35 |
From e696b94743d880c30c6e4e39c753e4d652845e85 Mon Sep 17 00:00:00 2001
|
|
|
3f3ec35 |
From: John Soni Jose <jose0here@gmail.com>
|
|
|
3f3ec35 |
Date: Fri, 21 Mar 2014 11:51:19 +0530
|
|
|
3f3ec35 |
Subject: [PATCH] Fix StatSN in Open-iSCSI Stack.
|
|
|
3f3ec35 |
|
|
|
3f3ec35 |
When LIO target is used, STATSN in login response can be in
|
|
|
3f3ec35 |
the range 0x0 - 0xFFFFFFFF. Open-iSCSI Stack had the type
|
|
|
3f3ec35 |
as ISCSI_INT for StatSN, so StatSN used to get reset to 0.
|
|
|
3f3ec35 |
|
|
|
3f3ec35 |
Adding new type ISCSI_UINT feild to fix this issue.
|
|
|
3f3ec35 |
|
|
|
3f3ec35 |
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
|
|
|
3f3ec35 |
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
|
|
|
3f3ec35 |
---
|
|
|
3f3ec35 |
usr/initiator_common.c | 2 +-
|
|
|
3f3ec35 |
usr/iscsi_ipc.h | 1 +
|
|
|
3f3ec35 |
usr/netlink.c | 3 +++
|
|
|
3f3ec35 |
3 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
3f3ec35 |
|
|
|
3f3ec35 |
diff --git a/usr/initiator_common.c b/usr/initiator_common.c
|
|
|
3f3ec35 |
index 109e8d7..50f8d41 100644
|
|
|
3f3ec35 |
--- a/usr/initiator_common.c
|
|
|
3f3ec35 |
+++ b/usr/initiator_common.c
|
|
|
3f3ec35 |
@@ -431,7 +431,7 @@ int iscsi_session_set_neg_params(struct iscsi_conn *conn)
|
|
|
3f3ec35 |
}, {
|
|
|
3f3ec35 |
.param = ISCSI_PARAM_EXP_STATSN,
|
|
|
3f3ec35 |
.value = &conn->exp_statsn,
|
|
|
3f3ec35 |
- .type = ISCSI_INT,
|
|
|
3f3ec35 |
+ .type = ISCSI_UINT,
|
|
|
3f3ec35 |
.conn_only = 1,
|
|
|
3f3ec35 |
}, {
|
|
|
3f3ec35 |
.param = ISCSI_PARAM_TPGT,
|
|
|
3f3ec35 |
diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h
|
|
|
3f3ec35 |
index 9d26d54..5087b5c 100644
|
|
|
3f3ec35 |
--- a/usr/iscsi_ipc.h
|
|
|
3f3ec35 |
+++ b/usr/iscsi_ipc.h
|
|
|
3f3ec35 |
@@ -30,6 +30,7 @@
|
|
|
3f3ec35 |
|
|
|
3f3ec35 |
enum {
|
|
|
3f3ec35 |
ISCSI_INT,
|
|
|
3f3ec35 |
+ ISCSI_UINT,
|
|
|
3f3ec35 |
ISCSI_STRING,
|
|
|
3f3ec35 |
};
|
|
|
3f3ec35 |
|
|
|
3f3ec35 |
diff --git a/usr/netlink.c b/usr/netlink.c
|
|
|
3f3ec35 |
index 532d9ef..b0dfb03 100644
|
|
|
3f3ec35 |
--- a/usr/netlink.c
|
|
|
3f3ec35 |
+++ b/usr/netlink.c
|
|
|
3f3ec35 |
@@ -716,6 +716,9 @@ kset_param(uint64_t transport_handle, uint32_t sid, uint32_t cid,
|
|
|
3f3ec35 |
case ISCSI_INT:
|
|
|
3f3ec35 |
sprintf(param_str, "%d", *((int *)value));
|
|
|
3f3ec35 |
break;
|
|
|
3f3ec35 |
+ case ISCSI_UINT:
|
|
|
3f3ec35 |
+ sprintf(param_str, "%u", *((unsigned int *)value));
|
|
|
3f3ec35 |
+ break;
|
|
|
3f3ec35 |
case ISCSI_STRING:
|
|
|
3f3ec35 |
if (!strlen(value))
|
|
|
3f3ec35 |
return 0;
|
|
|
3f3ec35 |
--
|
|
|
3f3ec35 |
1.9.3
|
|
|
3f3ec35 |
|