scsi: target/core: Simplify the code for aborting SCSI commands
authorBart Van Assche <bvanassche@acm.org>
Tue, 27 Nov 2018 23:52:01 +0000 (15:52 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 8 Dec 2018 02:20:07 +0000 (21:20 -0500)
commitfbbd49235590ca759aada500b5a935e06b7f6708
tree742d1a551d78e26c1da1fd5b0b6cc31d0423f6a3
parenta014c3647a15ccb946dc6ea387a40098aeab5dc8
scsi: target/core: Simplify the code for aborting SCSI commands

Instead of allowing the code that aborts a SCSI command to finish before
all iSCSI data frames have been received, make that code wait until all
iSCSI data frames have been received. Introduce a new member variable in
the target driver template to communicate that information from the iSCSI
target driver to the target core. This change allows to leave out the check
whether or not it is already safe to send the TASK_ABORTED reply from
transport_send_task_abort().

Cc: Nicholas Bellinger <nab@linux-iscsi.org>
Cc: Mike Christie <mchristi@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Disseldorp <ddiss@suse.de>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/iscsi/iscsi_target_configfs.c
drivers/target/target_core_transport.c
include/target/target_core_fabric.h