[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 6/7] vhost-user: Monitor slave channel in vhost_user_read(
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v2 6/7] vhost-user: Monitor slave channel in vhost_user_read() |
Date: |
Mon, 15 Mar 2021 12:20:39 +0000 |
On Fri, Mar 12, 2021 at 10:22:11AM +0100, Greg Kurz wrote:
> Now that everything is in place, have the nested event loop to monitor
> the slave channel. The source in the main event loop is destroyed and
> recreated to ensure any pending even for the slave channel that was
> previously detected is purged. This guarantees that the main loop
> wont invoke slave_read() based on an event that was already handled
> by the nested loop.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
> v2: - also monitor G_IO_HUP (Stefan)
> - refactored the code a bit
> ---
> hw/virtio/vhost-user.c | 35 ++++++++++++++++++++++++++++++++---
> 1 file changed, 32 insertions(+), 3 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
signature.asc
Description: PGP signature
- [PATCH v2 0/7] virtiofsd: Avoid potential deadlocks, Greg Kurz, 2021/03/12
- [PATCH v2 1/7] vhost-user: Drop misleading EAGAIN checks in slave_read(), Greg Kurz, 2021/03/12
- [PATCH v2 2/7] vhost-user: Fix double-close on slave_read() error path, Greg Kurz, 2021/03/12
- [PATCH v2 4/7] vhost-user: Convert slave channel to QIOChannelSocket, Greg Kurz, 2021/03/12
- [PATCH v2 3/7] vhost-user: Factor out duplicated slave_fd teardown code, Greg Kurz, 2021/03/12
- [PATCH v2 6/7] vhost-user: Monitor slave channel in vhost_user_read(), Greg Kurz, 2021/03/12
- Re: [PATCH v2 6/7] vhost-user: Monitor slave channel in vhost_user_read(),
Stefan Hajnoczi <=
- [PATCH v2 5/7] vhost-user: Introduce nested event loop in vhost_user_read(), Greg Kurz, 2021/03/12
- [PATCH v2 7/7] virtiofsd: Release vu_dispatch_lock when stopping queue, Greg Kurz, 2021/03/12