Don't abort not yet received commands

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2011-04-29 19:54:13 +00:00
parent 0c6cf4100d
commit 8443ae6bc7
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -650,6 +650,7 @@ again:
TRACE_MGMT_DBG("Unabort not yet received cmnd %p",
cmnd);
clear_bit(ISCSI_CMD_ABORTED, &cmnd->prelim_compl_flags);
continue;
} else if (cmnd->scst_state == ISCSI_CMD_STATE_RX_CMD) {
TRACE_MGMT_DBG("Aborted cmnd %p is RX_CMD, "
"keep waiting", cmnd);
+14
View File
@@ -838,7 +838,21 @@ static int process_read_io(struct iscsi_conn *conn, int *closed)
case RX_BHS:
res = do_recv(conn);
if (res == 0) {
/*
* Clear aborted status if this command was
* accidentally aborted with other commands of
* this connection. This command not yet
* received on the aborted time, so shouldn't be
* affected by the abort.
*/
if (cmnd->prelim_compl_flags != 0)
TRACE_MGMT_DBG("Unabort not yet "
"received cmnd %p (flags %lx)",
cmnd, cmnd->prelim_compl_flags);
cmnd->prelim_compl_flags = 0;
iscsi_cmnd_get_length(&cmnd->pdu);
if (cmnd->pdu.ahssize == 0) {
if ((conn->hdigest_type & DIGEST_NONE) == 0)
conn->read_state = RX_INIT_HDIGEST;