All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>
Cc: Eric Blake <eblake@redhat.com>,
	qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] util/qemu-sockets: shoot unix_nonblocking_connect()
Date: Fri, 22 Jul 2016 11:30:22 +0100	[thread overview]
Message-ID: <20160722103022.GP20567@redhat.com> (raw)
In-Reply-To: <5791F6A3.5090706@cn.fujitsu.com>

On Fri, Jul 22, 2016 at 06:34:11PM +0800, Cao jin wrote:
> 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?

Yes, remove it all, as it is no longer needed.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2016-07-22 10:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21 10:33 [Qemu-devel] [PATCH 0/2] qemu-sockets: remove useless functions Cao jin
2016-07-21 10:33 ` [Qemu-devel] [PATCH 1/2] util/qemu-sockets: shoot inet_nonblocking_connect() Cao jin
2016-07-21 14:41   ` Eric Blake
2016-07-21 10:33 ` [Qemu-devel] [PATCH 2/2] util/qemu-sockets: shoot unix_nonblocking_connect() Cao jin
2016-07-21 14:42   ` Eric Blake
2016-07-21 15:39     ` Daniel P. Berrange
2016-07-22 10:34       ` Cao jin
2016-07-22 10:30         ` Daniel P. Berrange [this message]
2016-07-22 10:43           ` Cao jin
2016-07-22 10:38             ` Daniel P. Berrange
2016-07-22 11:05               ` Cao jin
2016-07-21 13:41 ` [Qemu-devel] [PATCH 0/2] qemu-sockets: remove useless functions Cao jin
2016-07-21 14:28 ` Paolo Bonzini

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=20160722103022.GP20567@redhat.com \
    --to=berrange@redhat.com \
    --cc=caoj.fnst@cn.fujitsu.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.