mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
scsi: introduce scsi_req_cancel
This is for when the request must be dropped in the void, but still memory should be freed. To this end, the devices register a second callback in SCSIBusOps. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
19d110ab8a
commit
94d3f98a3f
8 changed files with 80 additions and 17 deletions
|
@ -78,6 +78,7 @@ struct SCSIDeviceInfo {
|
|||
|
||||
struct SCSIBusOps {
|
||||
void (*complete)(SCSIRequest *req, int reason, uint32_t arg);
|
||||
void (*cancel)(SCSIRequest *req);
|
||||
};
|
||||
|
||||
struct SCSIBus {
|
||||
|
@ -115,6 +116,7 @@ void scsi_req_print(SCSIRequest *req);
|
|||
void scsi_req_data(SCSIRequest *req, int len);
|
||||
void scsi_req_complete(SCSIRequest *req);
|
||||
void scsi_req_abort(SCSIRequest *req, int status);
|
||||
void scsi_req_cancel(SCSIRequest *req);
|
||||
void scsi_device_purge_requests(SCSIDevice *sdev);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue