summaryrefslogtreecommitdiffstats
path: root/include/block
diff options
context:
space:
mode:
authorEric Blake2016-07-16 01:22:58 +0200
committerStefan Hajnoczi2016-07-20 15:11:55 +0200
commit47a5486d598e0cfef6c87c5f44b85955a5f2c4ff (patch)
treef9829a55d7484cd58245d34d2cab210d27a9df1b /include/block
parentblock: Convert .bdrv_aio_discard() to byte-based (diff)
downloadqemu-47a5486d598e0cfef6c87c5f44b85955a5f2c4ff.tar.gz
qemu-47a5486d598e0cfef6c87c5f44b85955a5f2c4ff.tar.xz
qemu-47a5486d598e0cfef6c87c5f44b85955a5f2c4ff.zip
block: Add .bdrv_co_pdiscard() driver callback
There's enough drivers with a sector-based callback that it will be easier to switch one at a time. This patch adds a byte-based callback, and then after all drivers are swapped, we'll drop the sector-based callback. [checkpatch doesn't like the space after coroutine_fn in block_int.h, but it's consistent with the rest of the file] Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1468624988-423-10-git-send-email-eblake@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 9bf9aed83d..8f16d1652e 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -167,6 +167,8 @@ struct BlockDriver {
int64_t offset, int count, BdrvRequestFlags flags);
int coroutine_fn (*bdrv_co_discard)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors);
+ int coroutine_fn (*bdrv_co_pdiscard)(BlockDriverState *bs,
+ int64_t offset, int count);
int64_t coroutine_fn (*bdrv_co_get_block_status)(BlockDriverState *bs,
int64_t sector_num, int nb_sectors, int *pnum,
BlockDriverState **file);