* [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock
@ 2018-05-02 10:55 Dr. David Alan Gilbert (git)
2018-05-02 19:48 ` Eric Blake
2018-05-08 10:30 ` Stefan Hajnoczi
0 siblings, 2 replies; 3+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2018-05-02 10:55 UTC (permalink / raw)
To: qemu-devel, mst, peter.maydell
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Use qemu_set_nonblock rather than a simple fcntl; cleaner
and I have no reason to change other flags.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
hw/virtio/vhost-user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
index 38da8692bb..c2bbb622d6 100644
--- a/hw/virtio/vhost-user.c
+++ b/hw/virtio/vhost-user.c
@@ -1076,7 +1076,7 @@ static int vhost_user_postcopy_advise(struct vhost_dev *dev, Error **errp)
error_setg(errp, "%s: Failed to get ufd", __func__);
return -1;
}
- fcntl(ufd, F_SETFL, O_NONBLOCK);
+ qemu_set_nonblock(ufd);
/* register ufd with userfault thread */
u->postcopy_fd.fd = ufd;
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock
2018-05-02 10:55 [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock Dr. David Alan Gilbert (git)
@ 2018-05-02 19:48 ` Eric Blake
2018-05-08 10:30 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2018-05-02 19:48 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git), qemu-devel, mst, peter.maydell
On 05/02/2018 05:55 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Use qemu_set_nonblock rather than a simple fcntl; cleaner
> and I have no reason to change other flags.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> hw/virtio/vhost-user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
(wonder if checkpatch.pl can be taught to easily recognize this one)
>
> diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> index 38da8692bb..c2bbb622d6 100644
> --- a/hw/virtio/vhost-user.c
> +++ b/hw/virtio/vhost-user.c
> @@ -1076,7 +1076,7 @@ static int vhost_user_postcopy_advise(struct vhost_dev *dev, Error **errp)
> error_setg(errp, "%s: Failed to get ufd", __func__);
> return -1;
> }
> - fcntl(ufd, F_SETFL, O_NONBLOCK);
> + qemu_set_nonblock(ufd);
>
> /* register ufd with userfault thread */
> u->postcopy_fd.fd = ufd;
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock
2018-05-02 10:55 [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock Dr. David Alan Gilbert (git)
2018-05-02 19:48 ` Eric Blake
@ 2018-05-08 10:30 ` Stefan Hajnoczi
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2018-05-08 10:30 UTC (permalink / raw)
To: Dr. David Alan Gilbert (git); +Cc: qemu-devel, mst, peter.maydell
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
On Wed, May 02, 2018 at 11:55:52AM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> Use qemu_set_nonblock rather than a simple fcntl; cleaner
> and I have no reason to change other flags.
>
> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> hw/virtio/vhost-user.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-08 10:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02 10:55 [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock Dr. David Alan Gilbert (git)
2018-05-02 19:48 ` Eric Blake
2018-05-08 10:30 ` Stefan Hajnoczi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.