qemu-patch-raspberry4/include
Fam Zheng 67da1dc5ce block: Introduce BlockDriver.bdrv_drain callback
Drivers can have internal request sources that generate IO, like the
need_check_timer in QED. Since we want quiesced periods that contain
nested event loops in block layer, we need to have a way to disable such
event sources.

Block drivers must implement the "bdrv_drain" callback if it has any
internal sources that can generate I/O activity, like a timer or a
worker thread (even in a library) that can schedule QEMUBH in an
asynchronous callback.

Update the comments of bdrv_drain and bdrv_drained_begin accordingly.

Like bdrv_requests_pending(), we should consider all the children of bs.
Before, the while loop just works, as bdrv_requests_pending() already
tracks its children; now we mustn't miss the callback, so recurse down
explicitly.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1447064214-29930-9-git-send-email-famz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-11-12 16:22:43 +01:00
..
block block: Introduce BlockDriver.bdrv_drain callback 2015-11-12 16:22:43 +01:00
crypto crypto: introduce new module for handling TLS sessions 2015-09-15 15:07:43 +01:00
disas disas: Add print_insn to disassemble info 2015-07-09 15:20:40 +02:00
exec qemu_ram_block_by_name 2015-11-10 14:51:48 +01:00
fpu softfloat: expand out STATUS macro 2015-02-06 16:11:38 +00:00
hw e1000: Introducing backward compatibility command line parameter 2015-11-12 15:26:54 +08:00
libdecnumber Fix new typos in comments (found by codespell) 2014-07-18 17:45:36 +04:00
migration Postcopy: Mark nohugepage before discard 2015-11-10 15:00:28 +01:00
monitor monitor/target-ppc: Define target_get_monitor_def 2015-11-12 14:53:36 +11:00
net vhost user: add rarp sending after live migration for legacy guest 2015-10-22 14:34:49 +03:00
qapi qapi: Simplify error cleanup in test-qmp-* 2015-11-10 08:08:21 +01:00
qemu migration_completion: Take current state 2015-11-10 15:00:27 +01:00
qom qom/object: fix 2 comment typos 2015-11-06 15:42:38 +03:00
standard-headers linux-headers: update from kvm/next 2015-10-12 18:29:26 +02:00
sysemu block: Add blk_get_refcnt() 2015-11-11 16:55:28 +01:00
ui replay: recording of the user input 2015-11-06 10:16:03 +01:00
config.h janitor: move remaining public headers to include/ 2012-12-19 08:32:46 +01:00
elf.h elf: Update EM_MOXIE definition 2015-09-25 12:04:43 +02:00
glib-compat.h glib: add compatibility interface for g_hash_table_add() 2015-10-30 09:01:03 +01:00
qemu-common.h Move page_size_init earlier 2015-11-10 14:51:48 +01:00
qemu-io.h qemu-io: Use BlockBackend 2015-02-16 15:07:19 +00:00
qjson.h QJSON: Add JSON writer 2015-02-05 17:16:14 +01:00
trace-tcg.h trace: [tcg] Generate TCG tracing routines 2014-08-12 14:26:12 +01:00
trace.h trace: [tcg] Include event definitions in "trace.h" 2014-08-12 14:26:12 +01:00