From: John Soni Jose <[email protected]>

 When LIO target is used, STATSN in login response can be in
 the range 0x0 - 0xFFFFFFFF. Open-iSCSI Stack had the type
 as ISCSI_INT for StatSN, so StatSN used to get reset to 0.

 Adding new type ISCSI_UINT feild to fix this issue.

Signed-off-by: John Soni Jose <[email protected]>
Signed-off-by: Jayamohan Kallickal <[email protected]>
---
 usr/initiator_common.c |    2 +-
 usr/iscsi_ipc.h        |    1 +
 usr/netlink.c          |    3 +++
 3 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/usr/initiator_common.c b/usr/initiator_common.c
index 109e8d7..50f8d41 100644
--- a/usr/initiator_common.c
+++ b/usr/initiator_common.c
@@ -431,7 +431,7 @@ int iscsi_session_set_neg_params(struct iscsi_conn *conn)
                }, {
                        .param = ISCSI_PARAM_EXP_STATSN,
                        .value = &conn->exp_statsn,
-                       .type = ISCSI_INT,
+                       .type = ISCSI_UINT,
                        .conn_only = 1,
                }, {
                        .param = ISCSI_PARAM_TPGT,
diff --git a/usr/iscsi_ipc.h b/usr/iscsi_ipc.h
index 9d26d54..5087b5c 100644
--- a/usr/iscsi_ipc.h
+++ b/usr/iscsi_ipc.h
@@ -30,6 +30,7 @@
 
 enum {
        ISCSI_INT,
+       ISCSI_UINT,
        ISCSI_STRING,
 };
 
diff --git a/usr/netlink.c b/usr/netlink.c
index 532d9ef..b0dfb03 100644
--- a/usr/netlink.c
+++ b/usr/netlink.c
@@ -716,6 +716,9 @@ kset_param(uint64_t transport_handle, uint32_t sid, 
uint32_t cid,
        case ISCSI_INT:
                sprintf(param_str, "%d", *((int *)value));
                break;
+       case ISCSI_UINT:
+               sprintf(param_str, "%u", *((unsigned int *)value));
+               break;
        case ISCSI_STRING:
                if (!strlen(value))
                        return 0;
-- 
1.7.4.1

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to