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>
18 KiB
18 KiB