scsi: iscsi: Prefer xmit of DataOut over new commands
authorDmitry Bogdanov <d.bogdanov@yadro.com>
Tue, 7 Jun 2022 13:19:53 +0000 (16:19 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 17 Jun 2022 01:53:39 +0000 (21:53 -0400)
commit65080c51fde468465e3547d72e4a593b1361c0f4
tree946787be2ef14d129373f1a54029c4c26a764f6f
parentc0d93b12f31c31748ca5d3349777c70f1e2a8228
scsi: iscsi: Prefer xmit of DataOut over new commands

iscsi_data_xmit() (TX worker) is iterating over the queue of new SCSI
commands concurrently with the queue being replenished. Only after the
queue is emptied will we start sending pending DataOut PDUs. That leads to
DataOut timeout on the target side and to connection reinstatement.

Give priority to pending DataOut commands over new commands.

Link: https://lore.kernel.org/r/20220607131953.11584-1-d.bogdanov@yadro.com
Reviewed-by: Konstantin Shelekhin <k.shelekhin@yadro.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libiscsi.c