qemu-e2k/include/block
Paolo Bonzini fc24908e7d blockjob: reimplement block_job_sleep_ns to allow cancellation
This reverts the effects of commit 4afeffc857 ("blockjob: do not allow
coroutine double entry or entry-after-completion", 2017-11-21)

This fixed the symptom of a bug rather than the root cause. Canceling the
wait on a sleeping blockjob coroutine is generally fine, we just need to
make it work correctly across AioContexts.  To do so, use a QEMUTimer
that calls block_job_enter.  Use a mutex to ensure that block_job_enter
synchronizes correctly with block_job_sleep_ns.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-By: Jeff Cody <jcody@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-11-29 15:26:21 +01:00
..
accounting.h block: make accounting thread-safe 2017-06-16 07:55:00 +08:00
aio.h aio: add missing aio_notify() to aio_enable_external() 2017-05-12 10:36:46 -04:00
block.h block: Make bdrv_next() keep strong references 2017-11-17 18:21:31 +01:00
block_backup.h backup: Switch block_backup.h to byte-based 2017-07-10 13:18:06 +02:00
block_int.h block: Align block status requests 2017-10-26 14:45:57 +02:00
blockjob.h blockjob: reimplement block_job_sleep_ns to allow cancellation 2017-11-29 15:26:21 +01:00
blockjob_int.h blockjob: reimplement block_job_sleep_ns to allow cancellation 2017-11-29 15:26:21 +01:00
dirty-bitmap.h dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes 2017-10-06 16:28:58 +02:00
nbd.h nbd: Fix struct name for structured reads 2017-11-09 10:17:12 -06:00
qapi.h block/qapi: Use blk_enable_write_cache() 2016-03-30 12:16:02 +02:00
raw-aio.h linux-aio: share one LinuxAioState within an AioContext 2016-07-18 15:09:31 +01:00
snapshot.h block: Add errp to bdrv_all_goto_snapshot() 2017-11-21 14:48:22 +01:00
thread-pool.h Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
throttle-groups.h block: add throttle block filter driver 2017-09-06 10:12:02 +02:00
write-threshold.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00