mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
virtio-scsi: Handle TMF request cancellation asynchronously
For VIRTIO_SCSI_T_TMF_ABORT_TASK and VIRTIO_SCSI_T_TMF_ABORT_TASK_SET, use scsi_req_cancel_async to start the cancellation. Because each tmf command may cancel multiple requests, we need to use a counter to track the number of remaining requests we still need to wait for. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8e0a9320e9
commit
49e7e31aa0
2 changed files with 64 additions and 9 deletions
|
@ -214,8 +214,13 @@ typedef struct VirtIOSCSIReq {
|
|||
/* Set by dataplane code. */
|
||||
VirtIOSCSIVring *vring;
|
||||
|
||||
/* Used for two-stage request submission */
|
||||
QTAILQ_ENTRY(VirtIOSCSIReq) next;
|
||||
union {
|
||||
/* Used for two-stage request submission */
|
||||
QTAILQ_ENTRY(VirtIOSCSIReq) next;
|
||||
|
||||
/* Used for cancellation of request during TMFs */
|
||||
int remaining;
|
||||
};
|
||||
|
||||
SCSIRequest *sreq;
|
||||
size_t resp_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue