]> git.proxmox.com Git - mirror_qemu.git/commit
block: for jobs, do not clear user_paused until after the resume
authorJeff Cody <jcody@redhat.com>
Tue, 21 Aug 2018 16:26:19 +0000 (12:26 -0400)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 21 Mar 2019 20:44:09 +0000 (15:44 -0500)
commitdef983b923ff05e48688c14fd16ace13af109c1a
treef5239d1534164de9d302fef04a74d4ab68399d66
parent3dceceec723649584ae5080631bf82624f212824
block: for jobs, do not clear user_paused until after the resume

The function job_cancel_async() will always cause an assert for blockjob
user resume.  We set job->user_paused to false, and then call
job->driver->user_resume().  In the case of blockjobs, this is the
block_job_user_resume() function.

In that function, we assert that job.user_paused is set to true.
Unfortunately, right before calling this function, it has explicitly
been set to false.

The fix is pretty simple: set job->user_paused to false only after the
job user_resume() function has been called.

Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Message-id: bb183b77d8f2dd6bd67b8da559a90ac1e74b2052.1534868459.git.jcody@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
(cherry picked from commit e321c0597c7590499bacab239d7f86e257f96bcd)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
job.c