diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-10-07 13:59:19 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-10-20 14:03:50 +0200 |
commit | a987ee1f1b49529850207057f600618205496c60 (patch) | |
tree | cc2a8b6a92247770517b23c9d30456b5e0d92e9c /hw/ide/core.c | |
parent | 4be746345f13e99e468c60acbd3a355e8183e3ce (diff) |
ide: Complete conversion from BlockDriverState to BlockBackend
Add a BlockBackend member to TrimAIOCB, so ide_issue_trim_cb() can use
blk_aio_discard() instead of bdrv_aio_discard().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r-- | hw/ide/core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c index a5c4698368..44e3d502d4 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -362,6 +362,7 @@ static void ide_set_signature(IDEState *s) typedef struct TrimAIOCB { BlockAIOCB common; + BlockBackend *blk; QEMUBH *bh; int ret; QEMUIOVector *qiov; @@ -421,8 +422,8 @@ static void ide_issue_trim_cb(void *opaque, int ret) } /* Got an entry! Submit and exit. */ - iocb->aiocb = bdrv_aio_discard(iocb->common.bs, sector, count, - ide_issue_trim_cb, opaque); + iocb->aiocb = blk_aio_discard(iocb->blk, sector, count, + ide_issue_trim_cb, opaque); return; } @@ -446,6 +447,7 @@ BlockAIOCB *ide_issue_trim(BlockBackend *blk, TrimAIOCB *iocb; iocb = blk_aio_get(&trim_aiocb_info, blk, cb, opaque); + iocb->blk = blk; iocb->bh = qemu_bh_new(ide_trim_bh_cb, iocb); iocb->ret = 0; iocb->qiov = qiov; |