Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32ae763e authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[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: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 06d25af4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ iscsi_iser_session_create(struct iscsi_endpoint *ep,
	struct Scsi_Host *shost;
	struct iser_conn *ib_conn;

	shost = iscsi_host_alloc(&iscsi_iser_sht, 0, ISER_DEF_CMD_PER_LUN);
	shost = iscsi_host_alloc(&iscsi_iser_sht, 0, ISER_DEF_CMD_PER_LUN, 1);
	if (!shost)
		return NULL;
	shost->transportt = iscsi_iser_scsi_transport;
+1 −1
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ void iser_snd_completion(struct iser_desc *tx_desc)

	if (resume_tx) {
		iser_dbg("%ld resuming tx\n",jiffies);
		scsi_queue_work(conn->session->host, &conn->xmitwork);
		iscsi_conn_queue_work(conn);
	}

	if (tx_desc->type == ISCSI_TX_CONTROL) {
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ struct cxgb3i_hba *cxgb3i_hba_host_add(struct cxgb3i_adapter *snic,

	shost = iscsi_host_alloc(&cxgb3i_host_template,
				 sizeof(struct cxgb3i_hba),
				 CXGB3I_SCSI_QDEPTH_DFLT);
				 CXGB3I_SCSI_QDEPTH_DFLT, 1);
	if (!shost) {
		cxgb3i_log_info("iscsi_host_alloc failed.\n");
		return NULL;
+1 −1
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ void cxgb3i_conn_tx_open(struct s3_conn *c3cn)
	cxgb3i_tx_debug("cn 0x%p.\n", c3cn);
	if (conn) {
		cxgb3i_tx_debug("cn 0x%p, cid %d.\n", c3cn, conn->id);
		scsi_queue_work(conn->session->host, &conn->xmitwork);
		iscsi_conn_queue_work(conn);
	}
}

+2 −2
Original line number Diff line number Diff line
@@ -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;
Loading