]> git.ipfire.org Git - thirdparty/qemu.git/commit - blockjob.c
blockjob: Remove AioContext notifiers
authorKevin Wolf <kwolf@redhat.com>
Mon, 6 May 2019 17:18:04 +0000 (19:18 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 20 May 2019 15:08:56 +0000 (17:08 +0200)
commit657e1203203ccb48cb041ecb3f1799bec8349744
tree4bf522411fbbc8908b83eef0fc621b65396b1df7
parent9ff7f0df8757c1c6ca582935c27db377a1eaeb22
blockjob: Remove AioContext notifiers

The notifiers made sure that the job is quiesced and that the
job->aio_context field is updated. The first part is unnecessary today
since bdrv_set_aio_context_ignore() drains the block node, and this
means drainig the block job, too. The second part can be done in the
.set_aio_ctx callback of the block job BdrvChildRole.

The notifiers were problematic because they poll the AioContext while
the graph is in an inconsistent state with some nodes already in the new
context, but others still in the old context. So removing the notifiers
not only simplifies the code, but actually makes the code safer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockjob.c