From 060f51c9dee3c58e2748c773ef1f7142047a4a2f Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Mon, 14 Nov 2011 12:44:26 +0000 Subject: block: add bdrv_co_is_allocated() interface This patch introduces the public bdrv_co_is_allocated() interface which can be used to query image allocation status while the VM is running. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block.h') diff --git a/block.h b/block.h index 83e17cad96..8482dbce75 100644 --- a/block.h +++ b/block.h @@ -143,6 +143,8 @@ int coroutine_fn bdrv_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); int coroutine_fn bdrv_co_writev(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov); +int coroutine_fn bdrv_co_is_allocated(BlockDriverState *bs, int64_t sector_num, + int nb_sectors, int *pnum); int bdrv_truncate(BlockDriverState *bs, int64_t offset); int64_t bdrv_getlength(BlockDriverState *bs); int64_t bdrv_get_allocated_file_size(BlockDriverState *bs); -- cgit v1.2.1