diff options
author | Fam Zheng <famz@redhat.com> | 2014-09-24 16:27:55 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-09-30 13:30:51 +0200 |
commit | a83cfd12d9868b6732e3c6e5b2cbd69a2e0ab689 (patch) | |
tree | 9df0c0f8fa533ba608e654dbc0b545d48266d2df /hw/scsi/scsi-generic.c | |
parent | 3df9caf88f5c0859ae380101fea47609ba1dbfbd (diff) |
scsi: Drop SCSIReqOps.cancel_io
The only two implementations are identical to each other, with nothing specific
to device: they only call bdrv_aio_cancel with the SCSIRequest.aiocb.
Let's move it to scsi-bus.
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-generic.c')
-rw-r--r-- | hw/scsi/scsi-generic.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index e92b418933..7e85047d7c 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -140,18 +140,6 @@ done: scsi_req_unref(&r->req); } -/* Cancel a pending data transfer. */ -static void scsi_cancel_io(SCSIRequest *req) -{ - SCSIGenericReq *r = DO_UPCAST(SCSIGenericReq, req, req); - - DPRINTF("Cancel tag=0x%x\n", req->tag); - if (r->req.aiocb) { - bdrv_aio_cancel(r->req.aiocb); - } - r->req.aiocb = NULL; -} - static int execute_command(BlockDriverState *bdrv, SCSIGenericReq *r, int direction, BlockDriverCompletionFunc *complete) @@ -458,7 +446,6 @@ const SCSIReqOps scsi_generic_req_ops = { .send_command = scsi_send_command, .read_data = scsi_read_data, .write_data = scsi_write_data, - .cancel_io = scsi_cancel_io, .get_buf = scsi_get_buf, .load_request = scsi_generic_load_request, .save_request = scsi_generic_save_request, |