Files
libiscsi/lib/socket.c
Peter Lieven 1f4a66abc8 PDU queue out PDUs in order of itt.
This patch fixes a deadlock case where all available
cmdsns have been used for command PDUs which need
additional Data-OUT PDUs to succeed (e.g. a write16
which is larger than first_burst_len).
In this case the target will never increase the maxcmdsn
leading to a deadlock in iscsi_write_to_socket().
If we receive the R2T for such a write request we will
queue the Data-OUT PDUs but at the end of queue. As
a result they will never be sent as the outqueue is already
stuck.

We fix this by sorting the outqueue by ascending itt.

Signed-off-by: Peter Lieven <pl@kamp.de>
2012-11-28 14:04:14 +01:00

18 KiB