diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-05-02 20:46:47 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-05-10 11:13:21 -0400 |
commit | 8d2860b3c3e933304f49171770658c00ed26fd79 (patch) | |
tree | 979395449d53d41bd22732a4be1387f9af73a994 /drivers/scsi/scsi_transport_iscsi.c | |
parent | be2df72e7ec5fa5e6e1ccccab6cef97ecbb9c191 (diff) |
[SCSI] iscsi: increment expstatsn during login
debugged by Ming and Rohan:
The problem Ming and Rohan debugged was that during a normal session
login, open-iscsi is not incrementing the exp_statsn counter. It was
stuck at zero. From the RFC, it looks like if the login response PDU has
a successful status then we should be incrementing that value. Also from
the RFC, it looks like if when we drop a connection then reconnect, we
should be using the exp_statsn from the old connection in the next
relogin attempt.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 1b96f7c4ce7a..44adafac861f 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include <scsi/iscsi_if.h> | 32 | #include <scsi/iscsi_if.h> |
33 | 33 | ||
34 | #define ISCSI_SESSION_ATTRS 11 | 34 | #define ISCSI_SESSION_ATTRS 11 |
35 | #define ISCSI_CONN_ATTRS 10 | 35 | #define ISCSI_CONN_ATTRS 11 |
36 | #define ISCSI_HOST_ATTRS 0 | 36 | #define ISCSI_HOST_ATTRS 0 |
37 | 37 | ||
38 | struct iscsi_internal { | 38 | struct iscsi_internal { |
@@ -1156,6 +1156,7 @@ iscsi_conn_int_attr(ifmarker, ISCSI_PARAM_IFMARKER_EN, "%d"); | |||
1156 | iscsi_conn_int_attr(ofmarker, ISCSI_PARAM_OFMARKER_EN, "%d"); | 1156 | iscsi_conn_int_attr(ofmarker, ISCSI_PARAM_OFMARKER_EN, "%d"); |
1157 | iscsi_conn_int_attr(persistent_port, ISCSI_PARAM_PERSISTENT_PORT, "%d"); | 1157 | iscsi_conn_int_attr(persistent_port, ISCSI_PARAM_PERSISTENT_PORT, "%d"); |
1158 | iscsi_conn_int_attr(port, ISCSI_PARAM_CONN_PORT, "%d"); | 1158 | iscsi_conn_int_attr(port, ISCSI_PARAM_CONN_PORT, "%d"); |
1159 | iscsi_conn_int_attr(exp_statsn, ISCSI_PARAM_EXP_STATSN, "%u"); | ||
1159 | 1160 | ||
1160 | #define iscsi_conn_str_attr_show(param) \ | 1161 | #define iscsi_conn_str_attr_show(param) \ |
1161 | static ssize_t \ | 1162 | static ssize_t \ |
@@ -1406,6 +1407,7 @@ iscsi_register_transport(struct iscsi_transport *tt) | |||
1406 | SETUP_CONN_RD_ATTR(ofmarker, ISCSI_OFMARKER_EN); | 1407 | SETUP_CONN_RD_ATTR(ofmarker, ISCSI_OFMARKER_EN); |
1407 | SETUP_CONN_RD_ATTR(address, ISCSI_CONN_ADDRESS); | 1408 | SETUP_CONN_RD_ATTR(address, ISCSI_CONN_ADDRESS); |
1408 | SETUP_CONN_RD_ATTR(port, ISCSI_CONN_PORT); | 1409 | SETUP_CONN_RD_ATTR(port, ISCSI_CONN_PORT); |
1410 | SETUP_CONN_RD_ATTR(exp_statsn, ISCSI_EXP_STATSN); | ||
1409 | 1411 | ||
1410 | if (tt->param_mask & ISCSI_PERSISTENT_ADDRESS) | 1412 | if (tt->param_mask & ISCSI_PERSISTENT_ADDRESS) |
1411 | SETUP_CONN_RD_ATTR(persistent_address, ISCSI_PERSISTENT_ADDRESS); | 1413 | SETUP_CONN_RD_ATTR(persistent_address, ISCSI_PERSISTENT_ADDRESS); |