• Mike Christie's avatar
    [SCSI] libiscsi, iscsi_tcp: check suspend bit before each call to xmit_task · 70b31c15
    Mike Christie authored
    If we had multiple tasks on the cmd or requeue  lists, and iscsi_tcp
    returns a error, the write_space function can still run and queue
    iscsi_data_xmit. If it was a legetimate problem and iscsi_conn_failure
    was run but we raced and iscsi_data_xmit was run first it could miss
    the suspend bit checks, and start trying to send data again and hit
    another timeout. A similar problem is present when using cxgb3i.
    
    This has libiscsi check the suspend bit before calling the xmit
    task callout, so we at least do not try sending multiple tasks
    (one could be sent).
    Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
    70b31c15
libiscsi.c 81.5 KB