Skip to content
Commit a71a5dc7 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

target: Fix compare_and_write_callback handling for non GOOD status

Following the bugfix for handling non SAM_STAT_GOOD COMPARE_AND_WRITE
status during COMMIT phase in commit 9b2792c3

, the same bug exists
for the READ phase as well.

This would manifest first as a lost SCSI response, and eventual
hung task during fabric driver logout or re-login, as existing
shutdown logic waited for the COMPARE_AND_WRITE se_cmd->cmd_kref
to reach zero.

To address this bug, compare_and_write_callback() has been changed
to set post_ret = 1 and return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE
as necessary to signal failure status.

Reported-by: default avatarBill Borsari <wgb@datera.io>
Cc: Bill Borsari <wgb@datera.io>
Tested-by: default avatarGary Guo <ghg@datera.io>
Cc: Gary Guo <ghg@datera.io>
Cc: <stable@vger.kernel.org> # v4.1+
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent fe25cc34
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment