[pve-devel] applied: [PATCH qemu] fix #2486: include fix for disk hot-resize regression (w/ iothread=1)
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Nov 25 13:51:14 CET 2019
On 11/25/19 12:38 PM, Stefan Reiter wrote:
> See: https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg03201.html
>
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> ...ule-virtio_notify_config-to-run-on-m.patch | 76 +++++++++++++++++++
> debian/patches/series | 1 +
> 2 files changed, 77 insertions(+)
> create mode 100644 debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch
>
> diff --git a/debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch b/debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch
> new file mode 100644
> index 0000000..f20c7d7
> --- /dev/null
> +++ b/debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch
> @@ -0,0 +1,76 @@
> +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
> +From: Sergio Lopez <slp at redhat.com>
> +Date: Mon, 16 Sep 2019 13:24:12 +0200
> +Subject: [PATCH] virtio-blk: schedule virtio_notify_config to run on main
> + context
> +
> +virtio_notify_config() needs to acquire the global mutex, which isn't
> +allowed from an iothread, and may lead to a deadlock like this:
> +
> + - main thead
> + * Has acquired: qemu_global_mutex.
> + * Is trying the acquire: iothread AioContext lock via
> + AIO_WAIT_WHILE (after aio_poll).
> +
> + - iothread
> + * Has acquired: AioContext lock.
> + * Is trying to acquire: qemu_global_mutex (via
> + virtio_notify_config->prepare_mmio_access).
> +
> +If virtio_blk_resize() is called from an iothread, schedule
> +virtio_notify_config() to be run in the main context BH.
> +
> +[Removed unnecessary newline as suggested by Kevin Wolf
> +<kwolf at redhat.com>.
> +--Stefan]
> +
> +Signed-off-by: Sergio Lopez <slp at redhat.com>
> +Reviewed-by: Kevin Wolf <kwolf at redhat.com>
> +Message-id: 20190916112411.21636-1-slp at redhat.com
> +Message-Id: <20190916112411.21636-1-slp at redhat.com>
> +Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
> +---
> + hw/block/virtio-blk.c | 16 +++++++++++++++-
> + 1 file changed, 15 insertions(+), 1 deletion(-)
> +
applied, thanks!
More information about the pve-devel
mailing list