aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-28 17:55:10 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-28 17:55:10 +0000
commit5eb456396d20554a6b9637b23519579f083aa992 (patch)
tree594c07299d7177e99d12ba97651b3ffd17631e75 /block.h
parentIntroducing qcow2 extensions (Uri Lublin) (diff)
downloadqemu-kvm-5eb456396d20554a6b9637b23519579f083aa992.tar.gz
qemu-kvm-5eb456396d20554a6b9637b23519579f083aa992.tar.bz2
qemu-kvm-5eb456396d20554a6b9637b23519579f083aa992.zip
block: support known backing format for image create and open (Uri Lublin)
Added a backing_format field to BlockDriverState. Added bdrv_create2 and drv->bdrv_create2 to create an image with a known backing file format. Upon bdrv_open2 if backing format is known use it, instead of probing the (backing) image. Signed-off-by: Uri Lublin <uril@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6908 c046a42c-6fe2-441c-8c8c-71466251a162
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 750816e55..6701d3450 100644
--- a/block.h
+++ b/block.h
@@ -62,6 +62,10 @@ BlockDriver *bdrv_find_format(const char *format_name);
int bdrv_create(BlockDriver *drv,
const char *filename, int64_t size_in_sectors,
const char *backing_file, int flags);
+int bdrv_create2(BlockDriver *drv,
+ const char *filename, int64_t size_in_sectors,
+ const char *backing_file, const char *backing_format,
+ int flags);
BlockDriverState *bdrv_new(const char *device_name);
void bdrv_delete(BlockDriverState *bs);
int bdrv_file_open(BlockDriverState **pbs, const char *filename, int flags);