[PATCH] qemu_driver: Acquire MODIFY job in qemuDomainStartDirtyRateCalc()

Michal Privoznik posted 1 patch 2 weeks, 1 day ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/ee5eaeb0a76bd5143ec7bf615629b63695a4e094.1617022156.git.mprivozn@redhat.com
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] qemu_driver: Acquire MODIFY job in qemuDomainStartDirtyRateCalc()

Posted by Michal Privoznik 2 weeks, 1 day ago
This API talks to QEMU and changes its internal state. Therefore,
it should acquire QEMU_JOB_MODIFY instead of QEMU_JOB_QUERY.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/qemu/qemu_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 69dc704a44..af015f0625 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20425,7 +20425,7 @@ qemuDomainStartDirtyRateCalc(virDomainPtr dom,
     if (virDomainStartDirtyRateCalcEnsureACL(dom->conn, vm->def) < 0)
         goto cleanup;
 
-    if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
+    if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
         goto cleanup;
 
     if (!virDomainObjIsActive(vm)) {
-- 
2.26.3

Re: [PATCH] qemu_driver: Acquire MODIFY job in qemuDomainStartDirtyRateCalc()

Posted by Jiri Denemark 2 weeks, 1 day ago
On Mon, Mar 29, 2021 at 14:49:36 +0200, Michal Privoznik wrote:
> This API talks to QEMU and changes its internal state. Therefore,
> it should acquire QEMU_JOB_MODIFY instead of QEMU_JOB_QUERY.
> 
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/qemu/qemu_driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 69dc704a44..af015f0625 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -20425,7 +20425,7 @@ qemuDomainStartDirtyRateCalc(virDomainPtr dom,
>      if (virDomainStartDirtyRateCalcEnsureACL(dom->conn, vm->def) < 0)
>          goto cleanup;
>  
> -    if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
> +    if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
>          goto cleanup;
>  
>      if (!virDomainObjIsActive(vm)) {

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>