lib/iscsi: Increment StatSN when sending asynchronous logout request

Without this increment, the following warning messages were collected
when processing the corresponding logout request.

 iscsi.c:4426:iscsi_pdu_hdr_handle: *DEBUG*: opcode 6
* iscsi.c:4398:iscsi_update_cmdsn: *DEBUG*: StatSN(5) advanced
 iscsi.c:2519:iscsi_pdu_hdr_op_logout: *DEBUG*: reason=0, ITT=74000030, cid=0
 iscsi.c:2531:iscsi_pdu_hdr_op_logout: *DEBUG*: CmdSN=92, ExpStatSN=5, StatSN=4, ExpCmdSN=92, MaxCmdSN=155
* iscsi.c:2546:iscsi_pdu_hdr_op_logout: *DEBUG*: StatSN(5/4) might have dropped
 iscsi.c:4506:iscsi_pdu_payload_handle: *DEBUG*: opcode 6

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iee2677317dd8974abdb69141eed7fb5e538933ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3940
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-08-26 17:22:18 +09:00 committed by Tomasz Zawadzki
parent 438fa38e4a
commit 767df1289a

View File

@ -810,6 +810,7 @@ iscsi_send_logout_request(struct spdk_iscsi_conn *conn)
to_be16(&rsph->param3, ISCSI_LOGOUT_REQUEST_TIMEOUT);
to_be32(&rsph->stat_sn, conn->StatSN);
conn->StatSN++;
to_be32(&rsph->exp_cmd_sn, conn->sess->ExpCmdSN);
to_be32(&rsph->max_cmd_sn, conn->sess->MaxCmdSN);