qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardwar


From: Janne Karhunen
Subject: Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.
Date: Mon, 2 May 2016 04:30:24 -0700

On Fri, Apr 29, 2016 at 12:41 AM, Fam Zheng <address@hidden> wrote:

>> Signed-off-by: Janne Karhunen <address@hidden>
>
> Sorry for the late reply, I was distracted..

Like wise, was traveling..


>>      if (qemu_opt_get_bool_del(opts, BLOCK_OPT_COMPAT6, false)) {
>> -        flags |= BLOCK_FLAG_COMPAT6;
>
> Please remove BLOCK_FLAG_COMPAT6 from include/block/block_int.h| as well.

Wasn't it removed?

-#define BLOCK_FLAG_COMPAT6          4


>> +        if (strcmp(hw_version, "4")) {
>
> Doesn't compat6 mean hw_version is 6? I think you want s/4/6/ here.

Yes and that's the functionality here. So the logic is that if
BLOCK_OPT_COMPAT6 was defined and hw_version had something other than
"4" we fail saying can't do both.

Test case:
qemu-img convert -f vmdk -O vmdk img.vmdk img.vmdk-output
ddb.virtualHWVersion = "4" (default)

qemu-img convert -f vmdk -O vmdk -o compat6=on img.vmdk img.vmdk-output
ddb.virtualHWVersion = "6" (compat6 default)

qemu-img convert -f vmdk -O vmdk -o hwversion=9 img.vmdk img.vmdk-output
ddb.virtualHWVersion = "9" (the new feature)


>> address@hidden hwversion
>> +Specify vmdk virtual hardware version. Option is mutually exclusive
>> +with the compat6 flag.
>
> The code is not really treating them exclusively, it only checks for
> contradiction of values.  So I suggest either fix the document or the code.

It fails instantly if you try to pass both so what do you suggest it
should do (returns -EINVAL)?

qemu-img convert -f vmdk -O vmdk -o compat6=on -o hwversion=9 img.vmdk
img.vmdk.out
qemu-img: img.vmdk-output: error while converting vmdk: compat6 and
hwversion are mutually exclusive


--
Janne



reply via email to

[Prev in Thread] Current Thread [Next in Thread]