task_mgmt: don't cancel local PDUs on ABORT TASK
Currently the iscsi_task_mgmt_abort_task_[a]sync() functions cancel any queued or dispatched (awaiting response) PDUs prior to transmitting the ABORT TASK TMF request, which means that a TMF request may be sent which references a PDU that the target never received. Bug: https://github.com/sahlberg/libiscsi/issues/192 Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -276,8 +276,6 @@ int
|
|||||||
iscsi_task_mgmt_abort_task_sync(struct iscsi_context *iscsi,
|
iscsi_task_mgmt_abort_task_sync(struct iscsi_context *iscsi,
|
||||||
struct scsi_task *task)
|
struct scsi_task *task)
|
||||||
{
|
{
|
||||||
iscsi_scsi_cancel_task(iscsi, task);
|
|
||||||
|
|
||||||
return iscsi_task_mgmt_sync(iscsi, task->lun,
|
return iscsi_task_mgmt_sync(iscsi, task->lun,
|
||||||
ISCSI_TM_ABORT_TASK,
|
ISCSI_TM_ABORT_TASK,
|
||||||
task->itt, task->cmdsn);
|
task->itt, task->cmdsn);
|
||||||
|
|||||||
@@ -101,14 +101,11 @@ iscsi_process_task_mgmt_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
iscsi_task_mgmt_abort_task_async(struct iscsi_context *iscsi,
|
iscsi_task_mgmt_abort_task_async(struct iscsi_context *iscsi,
|
||||||
struct scsi_task *task,
|
struct scsi_task *task,
|
||||||
iscsi_command_cb cb, void *private_data)
|
iscsi_command_cb cb, void *private_data)
|
||||||
{
|
{
|
||||||
iscsi_scsi_cancel_task(iscsi, task);
|
|
||||||
|
|
||||||
return iscsi_task_mgmt_async(iscsi,
|
return iscsi_task_mgmt_async(iscsi,
|
||||||
task->lun, ISCSI_TM_ABORT_TASK,
|
task->lun, ISCSI_TM_ABORT_TASK,
|
||||||
task->itt, task->cmdsn,
|
task->itt, task->cmdsn,
|
||||||
|
|||||||
Reference in New Issue
Block a user