diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-01-13 19:05:53 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2006-01-14 11:55:21 -0500 |
commit | 55e3299d9eca01fb2351c5d37e222872b7c6e0af (patch) | |
tree | ee8af84f5506c60b47d363209fc1ac7f05816974 /drivers/scsi/iscsi_tcp.c | |
parent | 7b8631b53bea286b68847a939b87135198335b66 (diff) |
[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) | |||
525 | __kfifo_put(ctask->r2tqueue, (void*)&r2t, sizeof(void*)); | 525 | __kfifo_put(ctask->r2tqueue, (void*)&r2t, sizeof(void*)); |
526 | __kfifo_put(conn->writequeue, (void*)&ctask, sizeof(void*)); | 526 | __kfifo_put(conn->writequeue, (void*)&ctask, sizeof(void*)); |
527 | 527 | ||
528 | schedule_work(&conn->xmitwork); | 528 | scsi_queue_work(session->host, &conn->xmitwork); |
529 | conn->r2t_pdus_cnt++; | 529 | conn->r2t_pdus_cnt++; |
530 | spin_unlock(&session->lock); | 530 | spin_unlock(&session->lock); |
531 | 531 | ||
@@ -1267,7 +1267,7 @@ iscsi_write_space(struct sock *sk) | |||
1267 | conn->old_write_space(sk); | 1267 | conn->old_write_space(sk); |
1268 | debug_tcp("iscsi_write_space: cid %d\n", conn->id); | 1268 | debug_tcp("iscsi_write_space: cid %d\n", conn->id); |
1269 | clear_bit(SUSPEND_BIT, &conn->suspend_tx); | 1269 | clear_bit(SUSPEND_BIT, &conn->suspend_tx); |
1270 | schedule_work(&conn->xmitwork); | 1270 | scsi_queue_work(conn->session->host, &conn->xmitwork); |
1271 | } | 1271 | } |
1272 | 1272 | ||
1273 | static void | 1273 | static void |
@@ -2275,7 +2275,7 @@ iscsi_xmitworker(void *data) | |||
2275 | */ | 2275 | */ |
2276 | mutex_lock(&conn->xmitmutex); | 2276 | mutex_lock(&conn->xmitmutex); |
2277 | if (iscsi_data_xmit(conn)) | 2277 | if (iscsi_data_xmit(conn)) |
2278 | schedule_work(&conn->xmitwork); | 2278 | scsi_queue_work(conn->session->host, &conn->xmitwork); |
2279 | mutex_unlock(&conn->xmitmutex); | 2279 | mutex_unlock(&conn->xmitmutex); |
2280 | } | 2280 | } |
2281 | 2281 | ||
@@ -2340,15 +2340,7 @@ iscsi_queuecommand(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) | |||
2340 | session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1); | 2340 | session->cmdsn, session->max_cmdsn - session->exp_cmdsn + 1); |
2341 | spin_unlock(&session->lock); | 2341 | spin_unlock(&session->lock); |
2342 | 2342 | ||
2343 | if (!in_interrupt() && mutex_trylock(&conn->xmitmutex)) { | 2343 | scsi_queue_work(host, &conn->xmitwork); |
2344 | spin_unlock_irq(host->host_lock); | ||
2345 | if (iscsi_data_xmit(conn)) | ||
2346 | schedule_work(&conn->xmitwork); | ||
2347 | mutex_unlock(&conn->xmitmutex); | ||
2348 | spin_lock_irq(host->host_lock); | ||
2349 | } else | ||
2350 | schedule_work(&conn->xmitwork); | ||
2351 | |||
2352 | return 0; | 2344 | return 0; |
2353 | 2345 | ||
2354 | reject: | 2346 | reject: |
@@ -2942,8 +2934,7 @@ iscsi_conn_send_generic(struct iscsi_conn *conn, struct iscsi_hdr *hdr, | |||
2942 | else | 2934 | else |
2943 | __kfifo_put(conn->mgmtqueue, (void*)&mtask, sizeof(void*)); | 2935 | __kfifo_put(conn->mgmtqueue, (void*)&mtask, sizeof(void*)); |
2944 | 2936 | ||
2945 | schedule_work(&conn->xmitwork); | 2937 | scsi_queue_work(session->host, &conn->xmitwork); |
2946 | |||
2947 | return 0; | 2938 | return 0; |
2948 | } | 2939 | } |
2949 | 2940 | ||