[SCSI] iscsi lib: have lib create work queue for transmitting IO

We were using the shost work queue which ended up being
a little akward since all iscsi hosts need a thread for
scanning, but only drivers hooked into libiscsi need
a workqueue for transmitting. So this patch moves the
xmit workqueue to the lib.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
Mike Christie
2009-03-05 14:46:03 -06:00
committed by James Bottomley
parent 06d25af4ed
commit 32ae763e3f
7 changed files with 48 additions and 16 deletions

View File

@@ -166,7 +166,7 @@ static void iscsi_sw_tcp_write_space(struct sock *sk)
tcp_sw_conn->old_write_space(sk);
ISCSI_SW_TCP_DBG(conn, "iscsi_write_space\n");
scsi_queue_work(conn->session->host, &conn->xmitwork);
iscsi_conn_queue_work(conn);
}
static void iscsi_sw_tcp_conn_set_callbacks(struct iscsi_conn *conn)
@@ -777,7 +777,7 @@ iscsi_sw_tcp_session_create(struct iscsi_endpoint *ep, uint16_t cmds_max,
return NULL;
}
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, 0, qdepth);
shost = iscsi_host_alloc(&iscsi_sw_tcp_sht, 0, qdepth, 1);
if (!shost)
return NULL;
shost->transportt = iscsi_sw_tcp_scsi_transport;