]> git.proxmox.com Git - mirror_qemu.git/commit - tests/test-blockjob.c
job: Add reference counting
authorKevin Wolf <kwolf@redhat.com>
Fri, 13 Apr 2018 16:50:05 +0000 (18:50 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 23 May 2018 12:30:49 +0000 (14:30 +0200)
commit80fa2c756b3241f24015a7503a01f7999d4a942d
treedb1b410af62162feb7d8b69651a9d671cf4cc030
parenta50c2ab858fe613fb805e53b4f6b970ab936706d
job: Add reference counting

This moves reference counting from BlockJob to Job.

In order to keep calling the BlockJob cleanup code when the job is
deleted via job_unref(), introduce a new JobDriver.free callback. Every
block job must use block_job_free() for this callback, this is asserted
in block_job_create().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
13 files changed:
block/backup.c
block/commit.c
block/mirror.c
block/stream.c
blockjob.c
include/block/blockjob.h
include/block/blockjob_int.h
include/qemu/job.h
job.c
qemu-img.c
tests/test-bdrv-drain.c
tests/test-blockjob-txn.c
tests/test-blockjob.c