target: Add return for se_cmd->transport_complete_callback
authorNicholas Bellinger <nab@daterainc.com>
Mon, 19 Aug 2013 21:34:17 +0000 (14:34 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 9 Sep 2013 21:29:26 +0000 (14:29 -0700)
commita6b0133c19af1ab268ed1f4414efa2782896a870
treead55c8b08d283a8cf1fa2b3ae6d9a8b0b02b8677
parent1c68cc1626341665a8bd1d2c7dfffd7fc852a79c
target: Add return for se_cmd->transport_complete_callback

This patch adds a sense_reason_t return to ->transport_complete_callback(),
and updates target_complete_ok_work() to invoke the call if necessary to
transport_send_check_condition_and_sense() during the failure case.

Also update xdreadwrite_callback() to use this return value.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Martin Petersen <martin.petersen@oracle.com>
Cc: Chris Mason <chris.mason@fusionio.com>
Cc: James Bottomley <JBottomley@Parallels.com>
Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Nicholas Bellinger <nab@daterainc.com>
drivers/target/target_core_sbc.c
drivers/target/target_core_transport.c
include/target/target_core_base.h