aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTing Wang <kathy.wangting@huawei.com>2015-06-26 17:37:35 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2015-07-07 14:27:14 +0100
commit970311646a701eecb103eb28093e8924d2fa6861 (patch)
treeb29db635f79eb8297b1fa35a9d60c3eb523e326b /include
parent25d9747b6427de8253221d544b45e50888d4cef7 (diff)
downloadqemu-970311646a701eecb103eb28093e8924d2fa6861.zip
qemu-970311646a701eecb103eb28093e8924d2fa6861.tar.gz
qemu-970311646a701eecb103eb28093e8924d2fa6861.tar.bz2
blockjob: add block_job_release function
There is job resource leak in function mirror_start_job, although bdrv_create_dirty_bitmap is unlikely failed. Add block_job_release for each release when needed. Signed-off-by: Ting Wang <kathy.wangting@huawei.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1435311455-56048-1-git-send-email-kathy.wangting@huawei.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/blockjob.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 57d8ef1..dd9d5e6 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -166,6 +166,14 @@ void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns);
void block_job_yield(BlockJob *job);
/**
+ * block_job_release:
+ * @bs: The block device.
+ *
+ * Release job resources when an error occurred or job completed.
+ */
+void block_job_release(BlockDriverState *bs);
+
+/**
* block_job_completed:
* @job: The job being completed.
* @ret: The status code.