From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-block@nongnu.org
Subject: [Qemu-devel] [PATCH 0/2] nbd: Async built-in server negotiation
Date: Wed, 30 Dec 2015 13:49:24 +0800 [thread overview]
Message-ID: <1451454566-15005-1-git-send-email-famz@redhat.com> (raw)
During nbd_send_negotiate, if the client simply doesn't respond, the function
will not return, and the whole event loop is blocked.
Make the I/O effectively asynchronous by using coroutine read/write, so that a
malicious or disappeared client cannot make a hang.
Fam
Fam Zheng (2):
nbd: Interface tweak of nbd_client_new
nbd: Coroutine based nbd_send_negotiate
blockdev-nbd.c | 5 ++-
include/block/nbd.h | 6 ++--
nbd.c | 87 ++++++++++++++++++++++++++++++++++++++++-------------
qemu-nbd.c | 16 +++++-----
4 files changed, 81 insertions(+), 33 deletions(-)
--
2.4.3
next reply other threads:[~2015-12-30 5:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-30 5:49 Fam Zheng [this message]
2015-12-30 5:49 ` [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new Fam Zheng
2016-01-08 16:24 ` Daniel P. Berrange
2016-01-08 18:24 ` Paolo Bonzini
2016-01-11 3:20 ` Fam Zheng
2015-12-30 5:49 ` [Qemu-devel] [PATCH 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng
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=1451454566-15005-1-git-send-email-famz@redhat.com \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@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).