[Pkg-iscsi-maintainers] [open-iscsi] 43/48: Fix StatSN in Open-iSCSI Stack.

Ritesh Raj Sarraf rrs at moszumanska.debian.org
Wed Aug 20 13:54:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

rrs pushed a commit to branch upstream-mnc
in repository open-iscsi.

commit e696b94743d880c30c6e4e39c753e4d652845e85
Author: John Soni Jose <jose0here at gmail.com>
Date:   Fri Mar 21 11:51:19 2014 +0530

    Fix StatSN in Open-iSCSI Stack.
    
     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 <sony.john-n at emulex.com>
    Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal at emulex.com>
---
 usr/initiator_common.c | 2 +-
 usr/iscsi_ipc.h        | 1 +
 usr/netlink.c          | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

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;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-iscsi/open-iscsi.git



More information about the Pkg-iscsi-maintainers mailing list