]> Git Repo - qemu.git/commit - include/block/blockjob.h
blockjob: Introduce reference count and fix reference to job->bs
authorFam Zheng <[email protected]>
Thu, 5 Nov 2015 23:13:11 +0000 (18:13 -0500)
committerKevin Wolf <[email protected]>
Thu, 12 Nov 2015 15:22:43 +0000 (16:22 +0100)
commit18930ba3d17866fff6df52ae6d2e54ce5c5ca04b
treed2105745115882ec2d58cbb2c8c58c3011393cb6
parentb976ea3cf591ac994cc17dcf0fc550c9aa9c0f5d
blockjob: Introduce reference count and fix reference to job->bs

Add reference count to block job, meanwhile move the ownership of the
reference to job->bs from the caller (which is released in two
completion callbacks) to the block job itself. It is necessary for
block_job_complete_sync to work, because block job shouldn't live longer
than its bs, as asserted in bdrv_delete.

Now block_job_complete_sync can be simplified.

Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: John Snow <[email protected]>
Message-id: 1446765200[email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/mirror.c
blockdev.c
blockjob.c
include/block/blockjob.h
qemu-img.c
This page took 0.02709 seconds and 4 git commands to generate.