diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-01-14 01:05:53 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-14 17:55:21 +0100 |
commit | 55e3299d9eca01fb2351c5d37e222872b7c6e0af (patch) | |
tree | ee8af84f5506c60b47d363209fc1ac7f05816974 /drivers/scsi/iscsi_tcp.c | |
parent | [SCSI] iscsi: seperate iscsi interface from setup functions (diff) | |
download | linux-55e3299d9eca01fb2351c5d37e222872b7c6e0af.tar.xz linux-55e3299d9eca01fb2351c5d37e222872b7c6e0af.zip |
[SCSI] iscsi: fix 4k stack iscsi setups
When we run the xmit code from queuecomand the stack trace
gets too deep. The patch runs the xmit code from the scsi_host
work queue. This fixes 4k stack and xfs support and should
fix the st and sg stack usage bugs.
Signed-off-by: Alex Aizman <itn780@yahoo.com>
Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index e31d350e6b67..4e4b1061a5e9 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c @@ -525,7 +525,7 @@ iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_cmd_task *ctask) __kfifo_put(ctask->r2tqueue, (void*)&r2t, sizeof(void*)); __kfifo_put(conn->writequeue, (void*)&ctask, sizeof(void*)); - schedule_work(&conn->xmitwork); + scsi_queue_work(session->host, &conn->xmitwork); conn->r2t_pdus_cnt++; spin_unlock(&session->lock); @@ -1267,7 +1267,7 @@ iscsi_write_space(struct sock *sk) conn->old_write_space(sk); debug_tcp("iscsi_write_space: cid %d\n", conn->id); clear_bit(SUSPEND_BIT, &conn->suspend_tx); - schedule_work(&conn->xmitwork); + scsi_queue_work(conn->session->host, &conn->xmitwork); } static void @@ -2275,7 +2275,7 @@ iscsi_xmitworker(void *data) */ mutex_lock(&conn->xmitmutex); if (iscsi_data_xmit(conn)) - schedule_work(&conn->xmitwork); + scsi_queue_work(conn->session->host, &conn->xmitwork); mutex_unlock(&conn->xmitmutex); } @@ -2340,15 +2340,7 @@ iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1); spin_unlock(&session->lock); - if (!in_interrupt() && mutex_trylock(&conn->xmitmutex)) { - spin_unlock_irq(host->host_lock); - if (iscsi_data_xmit(conn)) - schedule_work(&conn->xmitwork); - mutex_unlock(&conn->xmitmutex); - spin_lock_irq(host->host_lock); - } else - schedule_work(&conn->xmitwork); - + scsi_queue_work(host, &conn->xmitwork); return 0; reject: @@ -2942,8 +2934,7 @@ iscsi_conn_send_generic(struct iscsi_conn *conn, struct iscsi_hdr *hdr, else __kfifo_put(conn->mgmtqueue, (void*)&mtask, sizeof(void*)); - schedule_work(&conn->xmitwork); - + scsi_queue_work(session->host, &conn->xmitwork); return 0; } |