From: Stefan Hajnoczi <stefanha@redhat.com>
To: arei.gonglei@huawei.com
Cc: weidong.huang@huawei.com, mst@redhat.com,
wangxinxin.wang@huawei.com, peter.huangpeng@huawei.com,
qemu-devel@nongnu.org, kraxel@redhat.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
Date: Tue, 12 Aug 2014 10:02:56 +0100 [thread overview]
Message-ID: <20140812090256.GC20490@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1407749661-11640-1-git-send-email-arei.gonglei@huawei.com>
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
On Mon, Aug 11, 2014 at 05:34:19PM +0800, arei.gonglei@huawei.com wrote:
> From: Gonglei <arei.gonglei@huawei.com>
>
> Technically, fcntl(soc, F_SETFL, O_NONBLOCK)
> is incorrect since it clobbers all other file flags.
> We can use F_GETFL to get the current flags, set or
> clear the O_NONBLOCK flag, then use F_SETFL to set the flags.
>
> Using the qemu_set_nonblock() wrapper.
>
> BTW, qemu_set_nonblock() locate qemu/socket.h, some other files
> can not call it, such as tap-linux.c, maybe we can consider
> pulling it out. Any ideas? Thanks.
>
> Gonglei (2):
> qemu-char: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
> channel-posix: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
>
> qemu-char.c | 4 ++--
> qga/channel-posix.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
More of a chardev series but trivial and I've reviewed it.
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2014-08-12 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-11 9:34 [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) arei.gonglei
2014-08-11 9:34 ` [Qemu-devel] [PATCH 1/2] qemu-char: " arei.gonglei
2014-08-11 19:51 ` Eric Blake
2014-08-11 9:34 ` [Qemu-devel] [PATCH 2/2] channel-posix: " arei.gonglei
2014-08-11 19:52 ` Eric Blake
2014-08-12 9:02 ` Stefan Hajnoczi [this message]
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=20140812090256.GC20490@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=arei.gonglei@huawei.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.huangpeng@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=wangxinxin.wang@huawei.com \
--cc=weidong.huang@huawei.com \
/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).