qemu-patch-raspberry4/block
Kevin Wolf 3b7cd9fd8f qed: Use bottom half to resume waiting requests
The qed driver serialises allocating write requests. When the active
allocation is finished, the AIO callback is called, but after this, the
next allocating request is immediately processed instead of leaving the
coroutine. Resuming another allocation request in the same request
coroutine means that the request now runs in the wrong coroutine.

The following is one of the possible effects of this: The completed
request will generally reenter its request coroutine in a bottom half,
expecting that it completes the request in bdrv_driver_pwritev().
However, if the second request actually yielded before leaving the
coroutine, the reused request coroutine is in an entirely different
place and is reentered prematurely. Not a good idea.

Let's make sure that we exit the coroutine after completing the first
request by resuming the next allocating request only with a bottom
half.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-06-26 14:51:14 +02:00
..
accounting.c block: make accounting thread-safe 2017-06-16 07:55:00 +08:00
backup.c blockjob: introduce block_job_early_fail 2017-05-24 16:38:51 -04:00
blkdebug.c qapi: merge QInt and QFloat in QNum 2017-06-20 14:31:31 +02:00
blkreplay.c block: Do not unref bs->file on error in BD's open 2017-04-27 16:12:13 +02:00
blkverify.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00
block-backend.c block: split BlockAcctStats creation and setup 2017-06-16 07:55:00 +08:00
bochs.c block: do not set BDS read_only if copy_on_read enabled 2017-04-24 15:09:33 -04:00
cloop.c block: do not set BDS read_only if copy_on_read enabled 2017-04-24 15:09:33 -04:00
commit.c commit: Fix completion with extra reference 2017-06-26 14:51:12 +02:00
crypto.c crypto: move 'opaque' parameter to (nearly) the end of parameter list 2017-05-09 14:41:47 +01:00
curl.c curl: do not do aio_poll when waiting for a free CURLState 2017-05-16 10:34:50 -04:00
dirty-bitmap.c block: protect modification of dirty bitmaps with a mutex 2017-06-16 07:55:00 +08:00
dmg-bz2.c dmg: Move libbz2 code to dmg-bz2.so 2016-10-07 14:14:06 +02:00
dmg.c block: do not set BDS read_only if copy_on_read enabled 2017-04-24 15:09:33 -04:00
dmg.h dmg: Move libbz2 code to dmg-bz2.so 2016-10-07 14:14:06 +02:00
file-posix.c block/file-*: *_parse_filename() and colons 2017-05-29 15:39:54 +02:00
file-win32.c block/file-*: *_parse_filename() and colons 2017-05-29 15:39:54 +02:00
gluster.c block/gluster.c: Handle qdict_array_entries() failure 2017-06-09 08:41:29 -04:00
io.c block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate() 2017-06-26 14:51:13 +02:00
iscsi-opts.c block/iscsi: statically link qemu_iscsi_opts 2017-01-27 18:07:58 +01:00
iscsi.c block/iscsi: enable filename option and parsing 2017-06-14 17:39:46 -04:00
linux-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
Makefile.objs block/vxhs.c: Add support for a new block device type called "vxhs" 2017-04-24 15:08:42 -04:00
mirror.c block: protect modification of dirty bitmaps with a mutex 2017-06-16 07:55:00 +08:00
nbd-client.c nbd: rename read_sync and friends 2017-06-15 11:04:06 +02:00
nbd-client.h nbd: drop unused NBDClientSession.is_unix field 2017-03-27 14:41:01 +02:00
nbd.c qapi: merge QInt and QFloat in QNum 2017-06-20 14:31:31 +02:00
nfs.c QAPI patches for 2017-06-09 2017-06-22 11:34:39 +01:00
null.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00
parallels.c block: Add errp to b{lk,drv}_truncate() 2017-04-28 16:02:02 +02:00
qapi.c QAPI patches for 2017-06-09 2017-06-22 11:34:39 +01:00
qcow.c block/qcow.c: Fix memory leak in qcow_create() 2017-06-09 13:46:20 +02:00
qcow2-cache.c qcow2: Remove stale comment 2016-11-25 13:51:30 +01:00
qcow2-cluster.c qcow2: Use offset_into_cluster() and offset_to_l2_index() 2017-06-26 14:51:13 +02:00
qcow2-refcount.c qcow2: Make distinction between zero cluster types obvious 2017-05-11 14:28:07 +02:00
qcow2-snapshot.c qcow2: Discard/zero clusters by byte count 2017-05-11 14:28:07 +02:00
qcow2.c qcow2: Use offset_into_cluster() and offset_to_l2_index() 2017-06-26 14:51:13 +02:00
qcow2.h qcow2: Merge the writing of the COW regions with the guest data 2017-06-26 14:51:13 +02:00
qed-check.c qed: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
qed-cluster.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed-gencb.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-l2-cache.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-table.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed.c qed: Use bottom half to resume waiting requests 2017-06-26 14:51:14 +02:00
qed.h block: explicitly acquire aiocontext in timers that need it 2017-02-21 11:14:08 +00:00
quorum.c qapi: merge QInt and QFloat in QNum 2017-06-20 14:31:31 +02:00
raw-format.c block: Add .bdrv_truncate() error messages 2017-04-28 16:02:03 +02:00
rbd.c block/rbd: enable filename option and parsing 2017-06-14 17:39:46 -04:00
replication.c block: Make 'replication_state' an enum 2017-05-07 09:57:51 +03:00
sheepdog.c QAPI patches for 2017-06-09 2017-06-22 11:34:39 +01:00
snapshot.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00
ssh.c qapi: merge QInt and QFloat in QNum 2017-06-20 14:31:31 +02:00
stream.c stream: fix crash in stream_start() when block_job_create() fails 2017-05-26 16:48:21 +02:00
throttle-groups.c throttle: Update throttle-groups.c documentation 2017-06-26 14:51:13 +02:00
trace-events block/vxhs.c: Add support for a new block device type called "vxhs" 2017-04-24 15:08:42 -04:00
vdi.c migration: Create migration/blocker.h 2017-05-17 12:04:59 +02:00
vhdx-endian.c vhdx: Use QEMU UUID API 2016-09-23 11:42:52 +08:00
vhdx-log.c block: Add errp to b{lk,drv}_truncate() 2017-04-28 16:02:02 +02:00
vhdx.c migration: Create migration/blocker.h 2017-05-17 12:04:59 +02:00
vhdx.h block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 2014-12-12 15:42:22 +00:00
vmdk.c migration: Create migration/blocker.h 2017-05-17 12:04:59 +02:00
vpc.c migration: Create migration/blocker.h 2017-05-17 12:04:59 +02:00
vvfat.c qapi: merge QInt and QFloat in QNum 2017-06-20 14:31:31 +02:00
vxhs.c qobject: Use simpler QDict/QList scalar insertion macros 2017-05-09 09:13:51 +02:00
win32-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
write-threshold.c block: use bdrv_add_before_write_notifier 2016-10-07 13:34:07 +02:00