aboutsummaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-10-17 12:32:14 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-21 17:34:13 +0200
commit4265d620c5a91b58c757ce76fa2b0fff86fa1df1 (patch)
treeda029b3d1ffbdec9bfafacee4cb22a746b8a7f34 /block.h
parent6f6dc6565e2b65ec8c0cf47622b4f5f1468d194e (diff)
downloadqemu-4265d620c5a91b58c757ce76fa2b0fff86fa1df1.zip
qemu-4265d620c5a91b58c757ce76fa2b0fff86fa1df1.tar.gz
qemu-4265d620c5a91b58c757ce76fa2b0fff86fa1df1.tar.bz2
block: add bdrv_co_discard and bdrv_aio_discard support
This similarly adds support for coroutine and asynchronous discard. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/block.h b/block.h
index 65c5166..5a042c9 100644
--- a/block.h
+++ b/block.h
@@ -166,6 +166,9 @@ BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
BlockDriverCompletionFunc *cb, void *opaque);
BlockDriverAIOCB *bdrv_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, void *opaque);
+BlockDriverAIOCB *bdrv_aio_discard(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors,
+ BlockDriverCompletionFunc *cb, void *opaque);
void bdrv_aio_cancel(BlockDriverAIOCB *acb);
typedef struct BlockRequest {
@@ -196,6 +199,7 @@ void bdrv_flush_all(void);
void bdrv_close_all(void);
int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
+int bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors);
int bdrv_has_zero_init(BlockDriverState *bs);
int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors,
int *pnum);