On Tue, Dec 15, 2015 at 08:19:39 +0100, Martin Kletzander wrote:
On Mon, Dec 14, 2015 at 04:07:19PM +0100, Peter Krempa wrote:
>On Mon, Dec 14, 2015 at 15:57:38 +0100, Martin Kletzander wrote:
>> There is a slight problem here. The parameter in QEMU is called
>> detect_zeroes, but we use "zeros" a tiny bit more in our code and
>> documentation. I went with "zeros" to be consistent, but it might
>> confuse some people. However, the other way around might be as
>> confusing as this one, but we need to choose one.
>>
>> Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
>> ---
...
>> diff --git a/src/qemu/qemu_capabilities.c
b/src/qemu/qemu_capabilities.c
>> index 6e5d203f0667..34a492df4538 100644
>> --- a/src/qemu/qemu_capabilities.c
>> +++ b/src/qemu/qemu_capabilities.c
>> @@ -308,6 +308,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
>>
>> "virtio-tablet", /* 205 */
>> "virtio-input-host",
>> + "drive-detect-zeros",
>> );
>>
>>
>> @@ -2590,6 +2591,7 @@ static struct virQEMUCapsCommandLineProps
virQEMUCapsCommandLine[] = {
>> { "machine", "mem-merge", QEMU_CAPS_MEM_MERGE },
>> { "machine", "vmport", QEMU_CAPS_MACHINE_VMPORT_OPT },
>> { "drive", "discard", QEMU_CAPS_DRIVE_DISCARD },
>> + { "drive", "detect-zeroes",
QEMU_CAPS_DRIVE_DETECT_ZEROS },
>> { "realtime", "mlock", QEMU_CAPS_MLOCK },
>> { "boot-opts", "strict", QEMU_CAPS_BOOT_STRICT },
>> { "boot-opts", "reboot-timeout",
QEMU_CAPS_REBOOT_TIMEOUT },
>
>A very noticable inconsistency in naming.
>
That is described in cover letter as well as in the commit message and
should be discussed. As I said, I've found a reason for each spelling,
so I'm OK with either of them.
At least the capability name should be consistent with the command name.
Since the capabilities are qemu specific there is no reason to have the
discrepancy here.
I've googled some sources on the plural of 'zero' and looks like that
indeed 'zeros' is more commonly used. At any rate. I don't really care
which you actually choose for the XML name and variables, but the
capability name should be spelled as qemu spells it.
Peter