From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com
Subject: [Qemu-devel] [PATCH 00/10] block: AioContext management, part 1
Date: Mon, 6 May 2019 19:17:55 +0200 [thread overview]
Message-ID: <20190506171805.14236-1-kwolf@redhat.com> (raw)
Recently, a few bugs were reported that resulted from an inconsistent
state regarding AioContexts. Block nodes can end up in different
contexts than their users expect - the AioContext of a node can even
change under the feet of a device with no way for the device to forbid
this. We recently added a few basic checks to scsi-disk and virtio-blk,
but they are by far not enough.
This is the first part of my work to actually properly manage
AioContexts in the block layer rather than just doing some ad-hoc calls
to bdrv_set_aio_context() and hoping that everything will work out.
The goal of this first part is that bdrv_set_aio_context() propagates
the AioContext change not only to the children of the node like we
already do, but also to any other affected nodes, such as additional
parents or nodes connected to the requested one only through a block job
that operates on both nodes.
Keep in mind that a second part will follow and that this is visible in
some functions that may not seem that useful in this series. In
particular, bdrv_try_set_aio_context() isn't used much outside of test
cases in this series. This will change in the second part.
Kevin Wolf (10):
block: Add bdrv_try_set_aio_context()
block: Make bdrv_attach/detach_aio_context() static
block: Move recursion to bdrv_set_aio_context()
block: Propagate AioContext change to parents
test-block-iothread: Test AioContext propagation through the tree
block: Implement .(can_)set_aio_ctx for BlockBackend
block: Add blk_set_allow_aio_context_change()
blockjob: Propagate AioContext change to all job nodes
blockjob: Remove AioContext notifiers
test-block-iothread: Test AioContext propagation for block jobs
include/block/block.h | 10 ++
include/block/block_int.h | 25 +---
include/sysemu/block-backend.h | 1 +
block.c | 157 ++++++++++++++++++++++---
block/backup.c | 8 --
block/block-backend.c | 55 ++++++++-
block/mirror.c | 10 +-
blockjob.c | 77 ++++++-------
tests/test-block-iothread.c | 202 +++++++++++++++++++++++++++++++++
9 files changed, 449 insertions(+), 96 deletions(-)
--
2.20.1
next reply other threads:[~2019-05-06 17:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-06 17:17 Kevin Wolf [this message]
2019-05-06 17:17 ` [Qemu-devel] [PATCH 01/10] block: Add bdrv_try_set_aio_context() Kevin Wolf
2019-05-06 17:17 ` [Qemu-devel] [PATCH 02/10] block: Make bdrv_attach/detach_aio_context() static Kevin Wolf
2019-05-06 17:17 ` [Qemu-devel] [PATCH 03/10] block: Move recursion to bdrv_set_aio_context() Kevin Wolf
2019-05-06 17:17 ` [Qemu-devel] [PATCH 04/10] block: Propagate AioContext change to parents Kevin Wolf
2019-05-06 17:18 ` [Qemu-devel] [PATCH 05/10] test-block-iothread: Test AioContext propagation through the tree Kevin Wolf
2019-05-06 17:18 ` [Qemu-devel] [PATCH 06/10] block: Implement .(can_)set_aio_ctx for BlockBackend Kevin Wolf
2019-05-06 17:18 ` [Qemu-devel] [PATCH 07/10] block: Add blk_set_allow_aio_context_change() Kevin Wolf
2019-05-06 17:18 ` [Qemu-devel] [PATCH 08/10] blockjob: Propagate AioContext change to all job nodes Kevin Wolf
2019-05-06 17:18 ` [Qemu-devel] [PATCH 09/10] blockjob: Remove AioContext notifiers Kevin Wolf
2019-05-06 17:18 ` [Qemu-devel] [PATCH 10/10] test-block-iothread: Test AioContext propagation for block jobs Kevin Wolf
2019-05-20 11:08 ` [Qemu-devel] [PATCH 00/10] block: AioContext management, part 1 Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190506171805.14236-1-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).