From 17bd51f936ac0719ef7a93fb77e30313b55c83b5 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 16 Jun 2016 17:56:22 +0100 Subject: blockjob: move iostatus reset out of block_job_enter() The QMP block-job-resume command and cancellation may want to reset the job's iostatus. The next patches add a user who does not want to reset iostatus so move it up to block_job_enter() callers. Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Reviewed-by: Paolo Bonzini Message-id: 1466096189-6477-2-git-send-email-stefanha@redhat.com --- blockjob.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'blockjob.c') diff --git a/blockjob.c b/blockjob.c index 01b896b..5137dce 100644 --- a/blockjob.c +++ b/blockjob.c @@ -269,7 +269,6 @@ void block_job_resume(BlockJob *job) void block_job_enter(BlockJob *job) { - block_job_iostatus_reset(job); if (job->co && !job->busy) { qemu_coroutine_enter(job->co, NULL); } @@ -278,6 +277,7 @@ void block_job_enter(BlockJob *job) void block_job_cancel(BlockJob *job) { job->cancelled = true; + block_job_iostatus_reset(job); block_job_enter(job); } -- cgit v1.1