From 60ebac16bca3e3bf07c7ae67a69a7730aaa48712 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 15 Jul 2016 17:22:53 -0600 Subject: block: Convert bdrv_aio_discard() to byte-based Another step towards byte-based interfaces everywhere. Replace the sector-based bdrv_aio_discard() with a new byte-based bdrv_aio_pdiscard(), which silently ignores any unaligned head or tail. Driver callbacks will be converted in followup patches. Signed-off-by: Eric Blake Message-id: 1468624988-423-5-git-send-email-eblake@redhat.com Signed-off-by: Stefan Hajnoczi --- include/block/block.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/block/block.h b/include/block/block.h index 94cabbb685..11c162d594 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -316,9 +316,9 @@ BlockAIOCB *bdrv_aio_writev(BdrvChild *child, int64_t sector_num, BlockCompletionFunc *cb, void *opaque); BlockAIOCB *bdrv_aio_flush(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque); -BlockAIOCB *bdrv_aio_discard(BlockDriverState *bs, - int64_t sector_num, int nb_sectors, - BlockCompletionFunc *cb, void *opaque); +BlockAIOCB *bdrv_aio_pdiscard(BlockDriverState *bs, + int64_t offset, int count, + BlockCompletionFunc *cb, void *opaque); void bdrv_aio_cancel(BlockAIOCB *acb); void bdrv_aio_cancel_async(BlockAIOCB *acb); -- cgit v1.2.3-55-g7522