summaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2012-01-18 14:40:51 +0000
committerKevin Wolf <kwolf@redhat.com>2012-01-26 14:49:18 +0100
commite8a6bb9caa5379b0fcaca4e0a12aa6d2913961f3 (patch)
treee798e0ea0da0470567505371023b47498e530daf /block.h
parentaa398a5c3a4c0fc29baf02aee5283a7fa0f202a3 (diff)
downloadqemu-e8a6bb9caa5379b0fcaca4e0a12aa6d2913961f3.tar.gz
qemu-e8a6bb9caa5379b0fcaca4e0a12aa6d2913961f3.tar.bz2
qemu-e8a6bb9caa5379b0fcaca4e0a12aa6d2913961f3.zip
block: add bdrv_find_backing_image
Add bdrv_find_backing_image: given a BlockDriverState pointer, and an id, traverse the backing image chain to locate the id. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.h')
-rw-r--r--block.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block.h b/block.h
index a3b0b80859..cae289b2fb 100644
--- a/block.h
+++ b/block.h
@@ -148,6 +148,8 @@ 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);
+BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs,
+ const char *backing_file);
int bdrv_truncate(BlockDriverState *bs, int64_t offset);
int64_t bdrv_getlength(BlockDriverState *bs);
int64_t bdrv_get_allocated_file_size(BlockDriverState *bs);