Fam Zheng 18930ba3d1 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 <famz@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1446765200-3054-6-git-send-email-jsnow@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:43 +01:00
..
2015-11-11 16:55:28 +01:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:29 +02:00
2015-11-11 16:25:47 +01:00
2015-10-16 15:34:29 +02:00
2015-11-12 16:22:43 +01:00
2015-11-02 08:30:27 +01:00
2015-04-28 15:36:09 +02:00
2015-11-12 16:22:43 +01:00
2015-10-16 15:34:29 +02:00
2015-11-12 16:22:43 +01:00
2015-11-12 16:22:43 +01:00
2015-07-14 17:15:23 +02:00
2015-10-16 15:34:29 +02:00
2015-11-02 08:30:27 +01:00
2015-10-16 15:34:29 +02:00
2015-10-16 15:34:30 +02:00