From c9fbb99d41b05acf0d7b93deb2fcdbf9047c238e Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 28 Nov 2013 11:58:02 +0100 Subject: 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 Reviewed-by: Fam Zheng Reviewed-by: Benoit Canet --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/vmdk.c') diff --git a/block/vmdk.c b/block/vmdk.c index 6555663..5fb6c81 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; -- cgit v1.1