aboutsummaryrefslogtreecommitdiff
path: root/block.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-10-18 16:49:17 +0200
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:19 +0200
commit9156df12a4f3b3db63d1b292d081d814f02e311a (patch)
tree6b541c26aa1e698d2eb9055de28650e4606c05f0 /block.h
parent9887b616619f62977682e76927a9b5a6134cc8bf (diff)
block: add bdrv_open_backing_file
Mirroring runs without the backing file so that it can be copied outside QEMU. However, we need to add it at the time the job is completed and QEMU switches to the target. Factor out the common bits of opening an image and completing a mirroring operation. The new function does not assume that the file is closed immediately after it returns failure, so it keeps the BDRV_O_NO_BACKING flag up-to-date. 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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/block.h b/block.h
index ed4b90d64c..096fa09373 100644
--- a/block.h
+++ b/block.h
@@ -133,6 +133,7 @@ void bdrv_append(BlockDriverState *bs_new, BlockDriverState *bs_top);
void bdrv_delete(BlockDriverState *bs);
int bdrv_parse_cache_flags(const char *mode, int *flags);
int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags);
+int bdrv_open_backing_file(BlockDriverState *bs);
int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
BlockDriver *drv);
BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,