Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 40336
b: refs/heads/master
c: b5072ea
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Oct 25, 2006
1 parent 27c2eaf commit 0e56ee1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5831c737f724aa6a655a908d202221f079f30036
refs/heads/master: b5072ea0910e5c8c79b8313e0ef70ca763983dbf
25 changes: 23 additions & 2 deletions trunk/drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,27 @@ void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err)
}
EXPORT_SYMBOL_GPL(iscsi_conn_failure);

static int iscsi_xmit_imm_task(struct iscsi_conn *conn)
{
struct iscsi_hdr *hdr = conn->mtask->hdr;
int rc, was_logout = 0;

if ((hdr->opcode & ISCSI_OPCODE_MASK) == ISCSI_OP_LOGOUT) {
conn->session->state = ISCSI_STATE_IN_RECOVERY;
iscsi_block_session(session_to_cls(conn->session));
was_logout = 1;
}
rc = conn->session->tt->xmit_mgmt_task(conn, conn->mtask);
if (rc)
return rc;

if (was_logout) {
set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
return -ENODATA;
}
return 0;
}

/**
* iscsi_data_xmit - xmit any command into the scheduled connection
* @conn: iscsi connection
Expand Down Expand Up @@ -623,7 +644,7 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
conn->ctask = NULL;
}
if (conn->mtask) {
rc = tt->xmit_mgmt_task(conn, conn->mtask);
rc = iscsi_xmit_imm_task(conn);
if (rc)
goto again;
/* done with this in-progress mtask */
Expand All @@ -638,7 +659,7 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
list_add_tail(&conn->mtask->running,
&conn->mgmt_run_list);
spin_unlock_bh(&conn->session->lock);
rc = tt->xmit_mgmt_task(conn, conn->mtask);
rc = iscsi_xmit_imm_task(conn);
if (rc)
goto again;
}
Expand Down

0 comments on commit 0e56ee1

Please sign in to comment.