diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-05-30 01:37:28 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-05 19:12:25 -0400 |
commit | 3219e5294150aee7d389e19029f49b44fb6b5c9f (patch) | |
tree | 44236fd9f2eb40d5622cadb126e9f2672b129486 /include | |
parent | 040515f53c09047c76ad074dc6a280984dc84b04 (diff) |
[SCSI] iscsi: fix writepsace race
We can race and misset the suspend bit if iscsi_write_space is
called then iscsi_send returns with a failure indicating
there is no space.
To handle this this patch returns a error upwards allowing xmitworker
to decide if we need to try and transmit again. For the no
write space case xmitworker will not retry, and instead
let iscsi_write_space queue it back up if needed (this relies
on the work queue code to properly requeue us if needed).
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 92129b97d31e..b684426a5900 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -57,8 +57,12 @@ struct iscsi_mgmt_task; | |||
57 | * Called from queuecommand with session lock held. | 57 | * Called from queuecommand with session lock held. |
58 | * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. | 58 | * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. |
59 | * Called from iscsi_conn_send_generic with xmitmutex. | 59 | * Called from iscsi_conn_send_generic with xmitmutex. |
60 | * @xmit_cmd_task: requests LLD to transfer cmd task | 60 | * @xmit_cmd_task: Requests LLD to transfer cmd task. Returns 0 or the |
61 | * @xmit_mgmt_task: requests LLD to transfer mgmt task | 61 | * the number of bytes transferred on success, and -Exyz |
62 | * value on error. | ||
63 | * @xmit_mgmt_task: Requests LLD to transfer mgmt task. Returns 0 or the | ||
64 | * the number of bytes transferred on success, and -Exyz | ||
65 | * value on error. | ||
62 | * @cleanup_cmd_task: requests LLD to fail cmd task. Called with xmitmutex | 66 | * @cleanup_cmd_task: requests LLD to fail cmd task. Called with xmitmutex |
63 | * and session->lock after the connection has been | 67 | * and session->lock after the connection has been |
64 | * suspended and terminated during recovery. If called | 68 | * suspended and terminated during recovery. If called |