[stgt] [PATCH 10/15] Fix StatSN of R2Ts

Arne Redlich arne.redlich at googlemail.com
Tue Jun 9 18:22:37 CEST 2009


RFC 3720, 10.8.3 (StatSN of R2T PDUs):

   "The StatSN field will contain the next StatSN.  The StatSN for this
    connection is not advanced after this PDU is sent."

Signed-off-by: Arne Redlich <arne.redlich at googlemail.com>
---
 usr/iscsi/iscsid.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index bfc41eb..8e9876a 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -1037,6 +1037,8 @@ static int iscsi_r2t_build(struct iscsi_task *task)
 	rsp->itt = task->req.itt;
 	rsp->r2tsn = cpu_to_be32(task->exp_r2tsn++);
 	rsp->data_offset = cpu_to_be32(task->offset);
+	/* return next statsn for this conn w/o advancing it */
+	rsp->statsn = cpu_to_be32(conn->stat_sn);
 	rsp->ttt = (unsigned long) task;
 	length = min(task->r2t_count, conn->data_inout_max_length);
 	rsp->data_length = cpu_to_be32(length);
-- 
1.6.0.4



--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list