scsi: Introduce scsi_req_cancel_async
commit8e0a9320e94930fd6e5c2906c478203b80392f5c
authorFam Zheng <famz@redhat.com>
Sun, 28 Sep 2014 01:48:00 +0000 (28 09:48 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Sep 2014 11:30:51 +0000 (30 13:30 +0200)
tree73d7bfb2fc1b5c0b1e5ec233fc5b64289a1edad3
parentd5776465ee9a55815792efa34d79de240f4ffd99
scsi: Introduce scsi_req_cancel_async

Devices will call this function to start an asynchronous cancellation. The
bus->info->cancel will be called after the request is canceled.

Devices will probably need to track a separate TMF request that triggers this
cancellation, and wait until the cancellation is done before completing it. So
we store a notifier list in SCSIRequest and in scsi_req_cancel_complete we
notify them.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/scsi-bus.c
include/hw/scsi/scsi.h