[libvirt] [PATCH] qemu: fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72

Fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72 "disk->rawio == -1" indicates that this value is not specified. So in case of this, domain must not be tainted. Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: libvirt/src/qemu/qemu_domain.c =================================================================== --- libvirt.orig/src/qemu/qemu_domain.c +++ libvirt/src/qemu/qemu_domain.c @@ -1260,7 +1260,7 @@ void qemuDomainObjCheckDiskTaint(struct driver->allowDiskFormatProbing) qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_DISK_PROBING, logFD); - if (disk->rawio) + if (disk->rawio == 1) qemuDomainObjTaint(driver, obj, VIR_DOMAIN_TAINT_HIGH_PRIVILEGES, logFD); }

On 01/31/2012 05:54 PM, Taku Izumi wrote:
Fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72
"disk->rawio == -1" indicates that this value is not specified. So in case of this, domain must not be tainted.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ACK and pushed. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 01/31/2012 10:22 PM, Eric Blake wrote:
On 01/31/2012 05:54 PM, Taku Izumi wrote:
Fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72
"disk->rawio == -1" indicates that this value is not specified. So in case of this, domain must not be tainted.
Signed-off-by: Taku Izumi<izumi.taku@jp.fujitsu.com> --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK and pushed.
Sorry I didn't notice this mail earlier. Actually, in the version of the code that was pushed, the concept of using "-1" as the default value was scrapped in favor of having a "rawio_specified" bool in the structure that defaulted to false. This way the structure doesn't need any special initialization (the lack of which was causing multiple make check failures with the original patch). So, rawio will only ever be set to 0 or 1 - it will never be -1. This means that the code originally committed actually works correctly. The modification in this "fix" also works, though.
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On 02/03/2012 09:09 AM, Laine Stump wrote:
On 01/31/2012 10:22 PM, Eric Blake wrote:
On 01/31/2012 05:54 PM, Taku Izumi wrote:
Fix my typo at commit 74e034964c32edb1732d0ff7642f3977f3587d72
"disk->rawio == -1" indicates that this value is not specified. So in case of this, domain must not be tainted.
Signed-off-by: Taku Izumi<izumi.taku@jp.fujitsu.com> --- src/qemu/qemu_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK and pushed.
Sorry I didn't notice this mail earlier. Actually, in the version of the code that was pushed, the concept of using "-1" as the default value was scrapped in favor of having a "rawio_specified" bool in the structure that defaulted to false. This way the structure doesn't need any special initialization (the lack of which was causing multiple make check failures with the original patch). So, rawio will only ever be set to 0 or 1 - it will never be -1.
This means that the code originally committed actually works correctly. The modification in this "fix" also works, though.
And that still makes me wonder if we want to switch to a three-state enum, default, off, and on, and compare disk->rawio == VIR_DOMAIN_DISK_RAWIO_ON, rather than tracking a secondary bool. Oh well. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
Laine Stump
-
Taku Izumi