]> git.baikalelectronics.ru Git - kernel.git/commit
target: Fix unknown fabric callback queue-full errors
authorNicholas Bellinger <nab@linux-iscsi.org>
Mon, 31 Oct 2016 00:28:16 +0000 (17:28 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 31 Mar 2017 03:34:31 +0000 (20:34 -0700)
commit07e29536c5cfba9f20335d065e0bedb8b0242bcf
treea1a773017aac54049b2fb9319283c149ef7a9b46
parent4cca082e68967ba2d63b90f840c9ed7313bd782c
target: Fix unknown fabric callback queue-full errors

This patch fixes a set of queue-full response handling
bugs, where outgoing responses are leaked when a fabric
driver is propagating non -EAGAIN or -ENOMEM errors
to target-core.

It introduces TRANSPORT_COMPLETE_QF_ERR state used to
signal when CHECK_CONDITION status should be generated,
when fabric driver ->write_pending(), ->queue_data_in(),
or ->queue_status() callbacks fail with non -EAGAIN or
-ENOMEM errors, and data-transfer should not be retried.

Note all fabric driver -EAGAIN and -ENOMEM errors are
still retried indefinately with associated data-transfer
callbacks, following existing queue-full logic.

Also fix two missing ->queue_status() queue-full cases
related to CMD_T_ABORTED w/ TAS status handling.

Reported-by: Potnuri Bharat Teja <bharat@chelsio.com>
Reviewed-by: Potnuri Bharat Teja <bharat@chelsio.com>
Tested-by: Potnuri Bharat Teja <bharat@chelsio.com>
Cc: Potnuri Bharat Teja <bharat@chelsio.com>
Reported-by: Steve Wise <swise@opengridcomputing.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c
include/target/target_core_base.h