[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:
committed by
James Bottomley
parent
06d25af4ed
commit
32ae763e3f
@@ -318,6 +318,9 @@ struct iscsi_host {
|
||||
spinlock_t lock;
|
||||
int num_sessions;
|
||||
int state;
|
||||
|
||||
struct workqueue_struct *workq;
|
||||
char workq_name[20];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -343,7 +346,8 @@ extern int iscsi_host_get_param(struct Scsi_Host *shost,
|
||||
enum iscsi_host_param param, char *buf);
|
||||
extern int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev);
|
||||
extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
|
||||
int dd_data_size, uint16_t qdepth);
|
||||
int dd_data_size, uint16_t qdepth,
|
||||
bool xmit_can_sleep);
|
||||
extern void iscsi_host_remove(struct Scsi_Host *shost);
|
||||
extern void iscsi_host_free(struct Scsi_Host *shost);
|
||||
|
||||
@@ -379,6 +383,7 @@ extern void iscsi_session_failure(struct iscsi_cls_session *cls_session,
|
||||
extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
|
||||
enum iscsi_param param, char *buf);
|
||||
extern void iscsi_suspend_tx(struct iscsi_conn *conn);
|
||||
extern void iscsi_conn_queue_work(struct iscsi_conn *conn);
|
||||
|
||||
#define iscsi_conn_printk(prefix, _c, fmt, a...) \
|
||||
iscsi_cls_conn_printk(prefix, ((struct iscsi_conn *)_c)->cls_conn, \
|
||||
|
Reference in New Issue
Block a user