]> git.proxmox.com Git - mirror_qemu.git/commit - job.c
job: Move defer_to_main_loop to Job
authorKevin Wolf <kwolf@redhat.com>
Tue, 17 Apr 2018 14:41:17 +0000 (16:41 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 23 May 2018 12:30:50 +0000 (14:30 +0200)
commit1908a5590c7d214b1b6886bc19b81076fb65cec9
tree3ed4b71aa335ca7f13104455a18954570f106b42
parent08be6fe26f6c76d900fc987f58d322b94bc4e248
job: Move defer_to_main_loop to Job

Move the defer_to_main_loop functionality from BlockJob to Job.

The code can be simplified because we can use job->aio_context in
job_defer_to_main_loop_bh() now, instead of having to access the
BlockDriverState.

Probably taking the data->aio_context lock in addition was already
unnecessary in the old code because we didn't actually make use of
anything protected by the old AioContext except getting the new
AioContext, in case it changed between scheduling the BH and running it.
But it's certainly unnecessary now that the BDS isn't accessed at all
any more.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
12 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
tests/test-bdrv-drain.c
tests/test-blockjob-txn.c
tests/test-blockjob.c