[libvirt] [PATCH v2 2/2] qemu: Add support for zero-detection writes

Peter Krempa pkrempa at redhat.com
Mon Dec 14 15:07:19 UTC 2015


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 at redhat.com>
> ---
>  src/qemu/qemu_capabilities.c                       |  2 ++
>  src/qemu/qemu_capabilities.h                       |  1 +
>  src/qemu/qemu_command.c                            | 11 +++++++++
>  tests/qemucapabilitiesdata/caps_2.1.1-1.caps       |  1 +
>  tests/qemucapabilitiesdata/caps_2.4.0-1.caps       |  1 +
>  tests/qemucapabilitiesdata/caps_2.5.0-1.caps       |  1 +
>  .../qemuxml2argv-disk-drive-detect-zeros.args      | 27 ++++++++++++++++++++++
>  tests/qemuxml2argvtest.c                           |  4 ++++
>  8 files changed, 48 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeros.args
> 
> 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.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20151214/5edf7492/attachment-0001.sig>


More information about the libvir-list mailing list