]> git.proxmox.com Git - mirror_qemu.git/commit - block/blkdebug.c
blkdebug: move post-resume handling to resume_req_by_tag
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>
Mon, 14 Jun 2021 08:29:27 +0000 (10:29 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 19 Jul 2021 15:38:38 +0000 (17:38 +0200)
commitf48ff5af13eed0d2b39fdb91a37ed45fa3429e89
tree682ae238fe31b4221c01da620d28f99bcf20c9d0
parent69d0690c10083f21c7daaac544a44589a3ee34fc
blkdebug: move post-resume handling to resume_req_by_tag

We want to move qemu_coroutine_yield() after the loop on rules,
because QLIST_FOREACH_SAFE is wrong if the rule list is modified
while the coroutine has yielded.  Therefore move the suspended
request to the heap and clean it up from the remove side.
All that is left is for blkdebug_debug_event to handle the
yielding.

Co-developed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210614082931.24925-3-eesposit@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/blkdebug.c