diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2009-03-05 15:46:03 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-03-13 16:28:37 -0400 |
commit | 32ae763e3fce4192cd008956a340353a2e5c3192 (patch) | |
tree | af13b359c4e54fe60c8eb76c8927b41468dcbe57 /include/scsi | |
parent | 06d25af4edb60f9e9c7e74d342a6963a32e3392f (diff) |
[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>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/libiscsi.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 898de4a73727..b0b8a6992497 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -318,6 +318,9 @@ struct iscsi_host { | |||
318 | spinlock_t lock; | 318 | spinlock_t lock; |
319 | int num_sessions; | 319 | int num_sessions; |
320 | int state; | 320 | int state; |
321 | |||
322 | struct workqueue_struct *workq; | ||
323 | char workq_name[20]; | ||
321 | }; | 324 | }; |
322 | 325 | ||
323 | /* | 326 | /* |
@@ -343,7 +346,8 @@ extern int iscsi_host_get_param(struct Scsi_Host *shost, | |||
343 | enum iscsi_host_param param, char *buf); | 346 | enum iscsi_host_param param, char *buf); |
344 | extern int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev); | 347 | extern int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev); |
345 | extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | 348 | extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, |
346 | int dd_data_size, uint16_t qdepth); | 349 | int dd_data_size, uint16_t qdepth, |
350 | bool xmit_can_sleep); | ||
347 | extern void iscsi_host_remove(struct Scsi_Host *shost); | 351 | extern void iscsi_host_remove(struct Scsi_Host *shost); |
348 | extern void iscsi_host_free(struct Scsi_Host *shost); | 352 | extern void iscsi_host_free(struct Scsi_Host *shost); |
349 | 353 | ||
@@ -379,6 +383,7 @@ extern void iscsi_session_failure(struct iscsi_cls_session *cls_session, | |||
379 | extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | 383 | extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, |
380 | enum iscsi_param param, char *buf); | 384 | enum iscsi_param param, char *buf); |
381 | extern void iscsi_suspend_tx(struct iscsi_conn *conn); | 385 | extern void iscsi_suspend_tx(struct iscsi_conn *conn); |
386 | extern void iscsi_conn_queue_work(struct iscsi_conn *conn); | ||
382 | 387 | ||
383 | #define iscsi_conn_printk(prefix, _c, fmt, a...) \ | 388 | #define iscsi_conn_printk(prefix, _c, fmt, a...) \ |
384 | iscsi_cls_conn_printk(prefix, ((struct iscsi_conn *)_c)->cls_conn, \ | 389 | iscsi_cls_conn_printk(prefix, ((struct iscsi_conn *)_c)->cls_conn, \ |