[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3] util: remove the obsolete non-blocking conne
Re: [Qemu-block] [PATCH v3] util: remove the obsolete non-blocking connect
Mon, 24 Jul 2017 18:07:26 -0400
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
This was posted over a month ago with two R-Bs, did it get merged or
On 06/16/2017 04:54 AM, Mao Zhongyi wrote:
From: Cao jin <address@hidden>
The non-blocking connect mechanism is obsolete, and it doesn't
work well in inet connection, because it will call getaddrinfo
first and getaddrinfo will blocks on DNS lookups. Since commit
e65c67e4 & d984464e, the non-blocking connect of migration goes
through QIOChannel in a different manner(using a thread), and
nobody use this old non-blocking connect anymore.
Any newly written code which needs a non-blocking connect should
use the QIOChannel code, so we can drop NonBlockingConnectHandler
as a concept entirely.
Suggested-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Cao jin <address@hidden>
Signed-off-by: Mao Zhongyi <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
1. fix the mistake that adds a unmodified file '--help' [Fam Zheng]
1. block/ssh.c is not compiled in v1 which leads to no error
reported when I run make & make check, although I make a
mistake in block/ssh.c, because the package libssh2-devel
missed in my system. Now fixed it.
2. Write the prototype in a single line. [Juan Quintela]
Because it's a minor change, so still add the r-b.
This patch was reviewed by Daniel about a years ago, but it has never
been merged just since socket_connect() called by net_socket_connect_init()
where NonBlockingConnectHandler was passed to socket_connect(). it's broken.
Now this problem was worked around by Daniel's patch(commit 6701e551 'Revert
"Change net/socket.c to use socket_*() functions" again'). Therefore, resend
it, of course, part of related code has changed over the years, so changed
the patch accordingly.
The reviewed patch listed on:
block/sheepdog.c | 2 +-
block/ssh.c | 2 +-
include/qemu/sockets.h | 12 +--
io/channel-socket.c | 2 +-
util/qemu-sockets.c | 205 ++++++-------------------------------------------
5 files changed, 28 insertions(+), 195 deletions(-)
- Re: [Qemu-block] [PATCH v3] util: remove the obsolete non-blocking connect,
John Snow <=