[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vmdk: Only read cid from image file when openin
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] vmdk: Only read cid from image file when opening |
Date: |
Thu, 17 Oct 2013 15:25:59 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Oct 11, 2013 at 03:55:39PM +0800, Fam Zheng wrote:
> @@ -378,6 +359,22 @@ static int vmdk_parent_open(BlockDriverState *bs)
> }
>
> pstrcpy(bs->backing_file, end_name - p_name + 1, p_name);
> +
> + ret = bdrv_open_backing_file(bs, NULL, errp);
This breaks 'backing.' options since we ignore them here. I suggest
letting the block layer open the backing file as normal instead of
duplicating the code here.
Simply add a bool s->cid_checked field to remember whether the CID
needs to be checked. Then it will only be done once.