qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new
Date: Mon, 11 Jan 2016 11:20:18 +0800	[thread overview]
Message-ID: <20160111032018.GA24392@ad.usersys.redhat.com> (raw)
In-Reply-To: <568FFEE9.9040303@redhat.com>

On Fri, 01/08 19:24, Paolo Bonzini wrote:
> 
> 
> On 08/01/2016 17:24, Daniel P. Berrange wrote:
> >> >      if (nbd_send_negotiate(client)) {
> >> > +        shutdown(csock, 2);
> >> > +        close(csock);
> >> >          g_free(client);
> >> > -        return NULL;
> >> > +        ret = -1;
> >> > +        goto out;
> > If you simply make this failure code branch call close_fn() then I
> > think you can adding needing the new NBDClientNewCB entirely if....
> 
> Good idea, but note that close_fn will call nbd_client_put, so the
> close/g_free must be removed.  It's probably cleanest to change csock to
> client->sock in the shutdown call, too.

Good suggestions, will update and resend. Thanks!

Fam

  reply	other threads:[~2016-01-11  3:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-30  5:49 [Qemu-devel] [PATCH 0/2] nbd: Async built-in server negotiation Fam Zheng
2015-12-30  5:49 ` [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new Fam Zheng
2016-01-08 16:24   ` Daniel P. Berrange
2016-01-08 18:24     ` Paolo Bonzini
2016-01-11  3:20       ` Fam Zheng [this message]
2015-12-30  5:49 ` [Qemu-devel] [PATCH 2/2] nbd: Coroutine based nbd_send_negotiate Fam Zheng

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=20160111032018.GA24392@ad.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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).