From a689dbf2df74a55d43e3fc4d6aec30ed67ca998f Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Thu, 5 Nov 2015 18:13:13 -0500 Subject: blockjob: Add "completed" and "ret" in BlockJob They are set when block_job_completed is called. Signed-off-by: Fam Zheng Reviewed-by: John Snow Reviewed-by: Max Reitz Signed-off-by: John Snow Message-id: 1446765200-3054-8-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- blockjob.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'blockjob.c') diff --git a/blockjob.c b/blockjob.c index ae9c5b2..bcd7efc 100644 --- a/blockjob.c +++ b/blockjob.c @@ -99,6 +99,9 @@ void block_job_completed(BlockJob *job, int ret) BlockDriverState *bs = job->bs; assert(bs->job == job); + assert(!job->completed); + job->completed = true; + job->ret = ret; job->cb(job->opaque, ret); block_job_unref(job); } -- cgit v1.1