aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index b1daf967d6..081c9eb765 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -423,8 +423,10 @@ static void ide_issue_trim_cb(void *opaque, int ret)
}
/* Got an entry! Submit and exit. */
- iocb->aiocb = blk_aio_discard(iocb->blk, sector, count,
- ide_issue_trim_cb, opaque);
+ iocb->aiocb = blk_aio_pdiscard(iocb->blk,
+ sector << BDRV_SECTOR_BITS,
+ count << BDRV_SECTOR_BITS,
+ ide_issue_trim_cb, opaque);
return;
}