mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
target: Add TFO->abort_task for aborted task resources release
Now that TASK_ABORTED status is not generated for all cases by TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is necessary in order to give fabric drivers a chance to unmap hardware / software resources before the se_cmd descriptor is released via the normal TFO->release_cmd() codepath. This patch adds TFO->aborted_task() in core_tmr_abort_task() in place of the original transport_send_task_abort(), and also updates all fabric drivers to implement this caller. The fabric drivers that include changes to perform cleanup via ->aborted_task() are: - iscsi-target - iser-target - srpt - tcm_qla2xxx The fabric drivers that currently set ->aborted_task() to NOPs are: - loopback - tcm_fc - usb-gadget - sbp-target - vhost-scsi For the latter five, there appears to be no additional cleanup required before invoking TFO->release_cmd() to release the se_cmd descriptor. v2 changes: - Move ->aborted_task() call into transport_cmd_finish_abort (Alex) Cc: Alex Leung <[email protected]> Cc: Mark Rustad <[email protected]> Cc: Roland Dreier <[email protected]> Cc: Vu Pham <[email protected]> Cc: Chris Boot <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Giridhar Malavali <[email protected]> Cc: Saurav Kashyap <[email protected]> Cc: Quinn Tran <[email protected]> Cc: Sagi Grimberg <[email protected]> Cc: Or Gerlitz <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
This commit is contained in:
parent
68259b5aac
commit
131e6abc67
18 changed files with 111 additions and 2 deletions
|
|
@ -539,6 +539,11 @@ static void tcm_vhost_queue_tm_rsp(struct se_cmd *se_cmd)
|
|||
return;
|
||||
}
|
||||
|
||||
static void tcm_vhost_aborted_task(struct se_cmd *se_cmd)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static void tcm_vhost_free_evt(struct vhost_scsi *vs, struct tcm_vhost_evt *evt)
|
||||
{
|
||||
vs->vs_events_nr--;
|
||||
|
|
@ -2131,6 +2136,7 @@ static struct target_core_fabric_ops tcm_vhost_ops = {
|
|||
.queue_data_in = tcm_vhost_queue_data_in,
|
||||
.queue_status = tcm_vhost_queue_status,
|
||||
.queue_tm_rsp = tcm_vhost_queue_tm_rsp,
|
||||
.aborted_task = tcm_vhost_aborted_task,
|
||||
/*
|
||||
* Setup callers for generic logic in target_core_fabric_configfs.c
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue