qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liu Yuan <namei.unix@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v2 3/7] net: enlarge connect_to_addr() scope
Date: Fri, 29 Mar 2013 13:42:20 +0800	[thread overview]
Message-ID: <1364535744-8707-4-git-send-email-namei.unix@gmail.com> (raw)
In-Reply-To: <1364535744-8707-1-git-send-email-namei.unix@gmail.com>

From: Liu Yuan <tailai.ly@taobao.com>

This is a prepare patch.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
---
 include/net.h        |    8 ++++++++
 sheep/sockfd_cache.c |    8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/net.h b/include/net.h
index a68c880..75ac197 100644
--- a/include/net.h
+++ b/include/net.h
@@ -72,4 +72,12 @@ int set_rcv_timeout(int fd);
 int get_local_addr(uint8_t *bytes);
 bool inetaddr_is_valid(char *addr);
 
+static inline int connect_to_addr(const uint8_t *addr, int port)
+{
+	char name[INET6_ADDRSTRLEN];
+
+	addr_to_str(name, sizeof(name), addr, 0);
+	return connect_to(name, port);
+}
+
 #endif
diff --git a/sheep/sockfd_cache.c b/sheep/sockfd_cache.c
index ddefbf2..1e0d6cf 100644
--- a/sheep/sockfd_cache.c
+++ b/sheep/sockfd_cache.c
@@ -337,14 +337,6 @@ static inline void check_idx(int idx)
 	queue_work(sys->sockfd_wqueue, w);
 }
 
-static inline int connect_to_addr(const uint8_t *addr, int port)
-{
-	char name[INET6_ADDRSTRLEN];
-
-	addr_to_str(name, sizeof(name), addr, 0);
-	return connect_to(name, port);
-}
-
 /* Add the node back if it is still alive */
 static inline int revalidate_node(const struct node_id *nid)
 {
-- 
1.7.9.5

  parent reply	other threads:[~2013-03-29  5:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29  5:42 [Qemu-devel] [PATCH v2 0/7] md: add hot-plug and hot-unplug support Liu Yuan
2013-03-29  5:42 ` [Qemu-devel] [PATCH v2 1/7] md: add support for simultaneous disk failure on the same node Liu Yuan
2013-03-29  5:42 ` [Qemu-devel] [PATCH v2 2/7] tests/055: test simultaneous multiple disk failures " Liu Yuan
2013-03-29  5:42 ` Liu Yuan [this message]
2013-03-29  5:42 ` [Qemu-devel] [PATCH v2 4/7] md: add hot-plug and hot-unplug support Liu Yuan
2013-03-29  5:42 ` [Qemu-devel] [PATCH v2 5/7] collie: add new commands to manipulate multi-disks Liu Yuan
2013-03-29  5:42 ` [Qemu-devel] [PATCH v2 6/7] sheep: remove duplicate recovery complete notification Liu Yuan
2013-03-29  5:42 ` [Qemu-devel] [PATCH v2 7/7] tsets: add 057 to test md hot-plug and hot-unplug Liu Yuan
2013-03-29  5:46 ` [Qemu-devel] [PATCH v2 0/7] md: add hot-plug and hot-unplug support Liu Yuan

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=1364535744-8707-4-git-send-email-namei.unix@gmail.com \
    --to=namei.unix@gmail.com \
    --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).