Hannes Reinecke wrote:
>
> If 'fast_abort' is not set we should be sending all outstanding
> Data-out PDUs to the target, even after we have received the
> tmf response. So we should make sure that the workqueue is really
> flushed and all PDUs have been processed before setting the
> 'SUSPEND' bit.
I tried to say this in the previous mails. Let me know if you are also
disagreeing with this or maybe just missed it.
iscsi_tcp, iser and cxgb3i can return from xmit_task when some buffer or
window closes. It can do this at any time, and it could leave a partial
pdu sent or if we are still trying to send all the data-outs for a
sequence then it could get stuck in the middle of that.
Instead of suspend_tx, I think we have to add some wait_on_cmds type of
function where we wait for commends affected by the tmf to be sent.
So something like
wait_on_commands()
{
loop for each cmd on requeue list
if (check_restrictions(task))
wait for a while then restart loop and check
}
// Instead of the wait we could also add some per task callback that
gets called when the data/pdus are finally sent, but that is probably
overkill.
eh_lu_reset()
{
if (tmf successful)
wait_on_commands()
fail_scsi_tasks()
}
>
> Signed-off-by: Hannes Reinecke <[email protected]>
> ---
> drivers/scsi/libiscsi.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 16d35f0..5606c4d 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -1880,9 +1880,9 @@ void iscsi_suspend_tx(struct iscsi_conn *conn)
> struct Scsi_Host *shost = conn->session->host;
> struct iscsi_host *ihost = shost_priv(shost);
>
> - set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
> if (ihost->workq)
> flush_workqueue(ihost->workq);
> + set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx);
> }
> EXPORT_SYMBOL_GPL(iscsi_suspend_tx);
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---