[libvirt] [PATCH 3/4] qemu: error out on attempt to change blkiotune group name

Ján Tomko posted 4 patches 6 years, 10 months ago
[libvirt] [PATCH 3/4] qemu: error out on attempt to change blkiotune group name
Posted by Ján Tomko 6 years, 10 months ago
Check that the attribute is the same in qemuDomainDiskChangeSupported
in case somebody tries to change it using the UpdateDevice API.

https://bugzilla.redhat.com/show_bug.cgi?id=1601677

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/qemu/qemu_domain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 72e322d6a7..e75ea15c91 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -9398,6 +9398,8 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
     CHECK_EQ(blkdeviotune.size_iops_sec,
              "blkdeviotune size_iops_sec",
              true);
+    CHECK_STREQ_NULLABLE(blkdeviotune.group_name,
+                         "blkdeviotune group name");
 
     if (disk->serial && STRNEQ_NULLABLE(disk->serial, orig_disk->serial)) {
         virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 3/4] qemu: error out on attempt to change blkiotune group name
Posted by Laine Stump 6 years, 10 months ago
On 3/28/19 10:34 AM, Ján Tomko wrote:
> Check that the attribute is the same in qemuDomainDiskChangeSupported
> in case somebody tries to change it using the UpdateDevice API.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1601677
>
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>   src/qemu/qemu_domain.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 72e322d6a7..e75ea15c91 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -9398,6 +9398,8 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
>       CHECK_EQ(blkdeviotune.size_iops_sec,
>                "blkdeviotune size_iops_sec",
>                true);
> +    CHECK_STREQ_NULLABLE(blkdeviotune.group_name,
> +                         "blkdeviotune group name");
>   
>       if (disk->serial && STRNEQ_NULLABLE(disk->serial, orig_disk->serial)) {
>           virReportError(VIR_ERR_OPERATION_UNSUPPORTED,


Again, as long as "no serial specified" is supposed to mean "serial 
remains unchanged" rather than "there should be no serial", then


Reviewed-by: Laine Stump <laine@laine.org>



--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list