[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] vmdk: Allow vmdk_create to work with protoco
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2] vmdk: Allow vmdk_create to work with protocol |
Date: |
Fri, 20 Dec 2013 09:17:14 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Dec 20, 2013 at 09:48:48AM +0800, Fam Zheng wrote:
> This improves vmdk_create to use bdrv_* functions to replace qemu_open
> and other fd functions. The error handling are improved as well. One
> difference is that bdrv_pwrite will round up buffer to sectors, so for
> description file, an extra bdrv_truncate is used in the end to drop
> inding zeros.
>
> Notes:
>
> - A bonus bug fix is correct endian is used in initializing GD entries.
>
> - ROUND_UP and DIV_ROUND_UP are used where possible.
>
> I tested that new code produces exactly the same file as previously.
>
> Signed-off-by: Fam Zheng <address@hidden>
>
> ---
> v2: Address Stefan's comments:
>
> Signed-off-by: Fam Zheng <address@hidden>
> ---
> block/vmdk.c | 164
> ++++++++++++++++++++++++++++++++++-------------------------
> 1 file changed, 95 insertions(+), 69 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan