ide: Convert trim_aiocb_info.cancel to .cancel_async
commite551c999bcca1f29742741033853651f6ea88479
authorFam Zheng <famz@redhat.com>
Thu, 11 Sep 2014 05:41:26 +0000 (11 13:41 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 22 Sep 2014 10:39:16 +0000 (22 11:39 +0100)
tree6105f38b1aa59e9452ec2966b77fcfe388ede6ab
parent5da91e4ef46fe85694c5c43a8f3a186a7a83cda7
ide: Convert trim_aiocb_info.cancel to .cancel_async

We know that either bh is scheduled or ide_issue_trim_cb will be called
again, so we just set i, j and ret to the right values. In both cases,
ide_trim_bh_cb will be called.

Also forward the cancellation to the iocb->aiocb which we get from
bdrv_aio_discard.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/ide/core.c