From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQXfb-0006Ju-3R for qemu-devel@nongnu.org; Fri, 22 Jul 2016 06:27:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQXfW-00039R-Qi for qemu-devel@nongnu.org; Fri, 22 Jul 2016 06:27:01 -0400 Received: from [59.151.112.132] (port=30962 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQXfW-00037H-8u for qemu-devel@nongnu.org; Fri, 22 Jul 2016 06:26:58 -0400 References: <1469097213-26441-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1469097213-26441-3-git-send-email-caoj.fnst@cn.fujitsu.com> <5790DF51.8030806@redhat.com> <20160721153953.GJ13528@redhat.com> From: Cao jin Message-ID: <5791F6A3.5090706@cn.fujitsu.com> Date: Fri, 22 Jul 2016 18:34:11 +0800 MIME-Version: 1.0 In-Reply-To: <20160721153953.GJ13528@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] util/qemu-sockets: shoot unix_nonblocking_connect() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Eric Blake Cc: qemu-devel@nongnu.org, Paolo Bonzini , Gerd Hoffmann Hi Daniel On 07/21/2016 11:39 PM, Daniel P. Berrange wrote: > On Thu, Jul 21, 2016 at 08:42:25AM -0600, Eric Blake wrote: >> On 07/21/2016 04:33 AM, Cao jin wrote: >>> It is never used, and now all connect is nonblocking via >>> inet_connect_addr(). >>> >> >> Could be squashed with 1/2. In fact, if you squash it, I'd title the patch: >> >> util: Drop unused *_nonblocking_connect() functions >> >> You may also want to call out which commit id rendered the functions unused. > > Well once those two functions are dropped the only other place accepting > NonBlockingConnectHandler is the socket_connect() method. Since nearly > everything is converted to QIOChannel now, there's only one caller of > socket_connect() left, and that's net/socket.c > > Any newly written code which needs a non-blocking connect should use the > QIOChannel code, so I don't see any further usage of socket_connect() > being added. > > IOW, we can rip out NonBlockingConnectHandler as a concept entirely, not > merely drop the *_nonblocking_connect() methods. > I don't quite follow the "rip out NonBlockingConnectHandler" thing. According what I learned from code, we offered non-blocking connection mechanism, but it seems nobody use it(all callers of socket_connect() set callback as NULL), so, do you mean removing this mechanism? more explanation will be much appreciated:) > Regards, > Daniel > -- Yours Sincerely, Cao jin