diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-28 17:55:10 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-03-28 17:55:10 +0000 |
commit | 5eb456396d20554a6b9637b23519579f083aa992 (patch) | |
tree | 594c07299d7177e99d12ba97651b3ffd17631e75 /block_int.h | |
parent | 9b80ddf3460f5513b917720a07a1d32ec4ba1817 (diff) | |
download | qemu-5eb456396d20554a6b9637b23519579f083aa992.zip qemu-5eb456396d20554a6b9637b23519579f083aa992.tar.gz qemu-5eb456396d20554a6b9637b23519579f083aa992.tar.bz2 |
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_int.h')
-rw-r--r-- | block_int.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h index b45bde0..af6dff6 100644 --- a/block_int.h +++ b/block_int.h @@ -91,6 +91,12 @@ struct BlockDriver { BlockDriverCompletionFunc *cb, void *opaque); AIOPool aio_pool; + + /* new create with backing file format */ + int (*bdrv_create2)(const char *filename, int64_t total_sectors, + const char *backing_file, const char *backing_format, + int flags); + struct BlockDriver *next; }; @@ -113,6 +119,7 @@ struct BlockDriverState { char filename[1024]; char backing_file[1024]; /* if non zero, the image is a diff of this file image */ + char backing_format[16]; /* if non-zero and backing_file exists */ int is_temporary; int media_changed; |