This serie aims to remove and clean up some bugs that came up when trying to replace the AioContext lock and still protect BlockDriverState fields.
They were part of the serie "Removal of Aiocontext lock through drains: protect bdrv_replace_child_noperm", but since that serie is still a work in progress and these fixes are pretty much independent, I split that in two separate series. This serie is based on "job: replace AioContext lock with job_mutex" Based-on: <20220208143513.1077229-1-eespo...@redhat.com> Emanuele Giuseppe Esposito (6): block/io.c: fix bdrv_child_cb_drained_begin invocations from a coroutine block.c: bdrv_replace_child_noperm: first remove the child, and then call ->detach() block.c: bdrv_replace_child_noperm: first call ->attach(), and then add child test-bdrv-drain.c: adapt test to the coming subtree drains test-bdrv-drain.c: remove test_detach_by_parent_cb() jobs: ensure sleep in job_sleep_ns is fully performed block.c | 18 +++++++----- block/io.c | 7 ++++- include/block/block-io.h | 8 ++++-- job.c | 19 +++++++------ tests/qemu-iotests/030 | 2 +- tests/qemu-iotests/151 | 4 +-- tests/unit/test-bdrv-drain.c | 53 ++++++++++++------------------------ tests/unit/test-blockjob.c | 2 +- 8 files changed, 55 insertions(+), 58 deletions(-) -- 2.31.1