summaryrefslogtreecommitdiff
path: root/block/vmdk.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2013-11-28 11:58:02 +0100
committerKevin Wolf <kwolf@redhat.com>2013-11-29 17:41:09 +0100
commitc9fbb99d41b05acf0d7b93deb2fcdbf9047c238e (patch)
treed69b04e2510ced9bc17efaa992ec78b79ab38280 /block/vmdk.c
parentf32f988c7778d0f1ff9c7e8d7547a354a7fdd3f6 (diff)
downloadqemu-c9fbb99d41b05acf0d7b93deb2fcdbf9047c238e.tar.gz
qemu-c9fbb99d41b05acf0d7b93deb2fcdbf9047c238e.tar.bz2
qemu-c9fbb99d41b05acf0d7b93deb2fcdbf9047c238e.zip
block: Use BDRV_O_NO_BACKING where appropriate
If you open an image temporarily just because you want to check its size or get it flushed, there's no real reason to open the whole backing file chain. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'block/vmdk.c')
-rw-r--r--block/vmdk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vmdk.c b/block/vmdk.c
index 6555663a7e..5fb6c813ef 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1690,7 +1690,7 @@ static int vmdk_create(const char *filename, QEMUOptionParameter *options,
}
if (backing_file) {
BlockDriverState *bs = bdrv_new("");
- ret = bdrv_open(bs, backing_file, NULL, 0, NULL, errp);
+ ret = bdrv_open(bs, backing_file, NULL, BDRV_O_NO_BACKING, NULL, errp);
if (ret != 0) {
bdrv_unref(bs);
return ret;