From: Darren Kenny <darren.kenny@oracle.com>
To: zhiyong.wu@ucloud.cn
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list
Date: Mon, 23 Oct 2017 12:25:50 +0100 [thread overview]
Message-ID: <20171023112550.lkwzsidpotdroyeh@starbug-vm.ie.oracle.com> (raw)
In-Reply-To: <1508786879-32603-1-git-send-email-zhiyong.wu@ucloud.cn>
That's consistent with the documented behaviour of
g_hash_table_remove_all().
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Thanks,
Darren.
On Tue, Oct 24, 2017 at 03:27:59AM +0800, zhiyong.wu@ucloud.cn wrote:
>From: Zhi Yong Wu <zhiyong.wu@ucloud.cn>
>
>When hash table is created with g_hash_table_new_full(),
>the free function has been registered. So it isn't necessary
>since g_hash_table_remove_all() will call connection_destroy()
>for each connection struct automatically.
>
>Signed-off-by: Zhi Yong Wu <zhiyong.wu@ucloud.cn>
>---
> net/colo.c | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
>diff --git a/net/colo.c b/net/colo.c
>index 28ce7c8..668abb7 100644
>--- a/net/colo.c
>+++ b/net/colo.c
>@@ -197,12 +197,6 @@ Connection *connection_get(GHashTable *connection_track_table,
> trace_colo_proxy_main("colo proxy connection hashtable full,"
> " clear it");
> connection_hashtable_reset(connection_track_table);
>- /*
>- * clear the conn_list
>- */
>- while (!g_queue_is_empty(conn_list)) {
>- connection_destroy(g_queue_pop_head(conn_list));
>- }
> }
>
> g_hash_table_insert(connection_track_table, new_key, conn);
>--
>1.7.1
>
>
next prev parent reply other threads:[~2017-10-23 11:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 19:27 [Qemu-devel] [PATCH] COLO: remove the operation to clear connection list zhiyong.wu
2017-10-23 11:25 ` Darren Kenny [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-23 19:29 Zhi Yong Wu
2017-10-23 19:26 zhiyong.wu
2017-10-23 10:40 Zhi Yong Wu
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=20171023112550.lkwzsidpotdroyeh@starbug-vm.ie.oracle.com \
--to=darren.kenny@oracle.com \
--cc=qemu-devel@nongnu.org \
--cc=zhiyong.wu@ucloud.cn \
/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).