qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/3] nbd: Drop nbd_can_read()
Date: Fri, 20 Jun 2014 19:04:54 +0200	[thread overview]
Message-ID: <53A469B6.4040708@redhat.com> (raw)
In-Reply-To: <20140619035846.GD21236@stefanha-thinkpad.redhat.com>

On 19.06.2014 05:58, Stefan Hajnoczi wrote:
> On Wed, Jun 18, 2014 at 09:06:41PM +0200, Max Reitz wrote:
>> +static void nbd_update_can_read(NBDClient *client)
>> +{
>> +    bool can_read = client->recv_coroutine ||
>> +                    client->nb_requests < MAX_NBD_REQUESTS;
>> +
>> +    if (can_read != client->can_read) {
>> +        client->can_read = can_read;
>> +        nbd_set_handlers(client);
>> +
>> +        /* If we got here, nb_requests had to be MAX_NBD_REQUESTS before */
>> +        if (client->nb_requests < MAX_NBD_REQUESTS) {
>> +            aio_notify(client->exp->ctx);
>> +        }
> nbd_set_handlers() indirectly invokes aio_notify(client->exp->ctx) via
> aio_set_fd_handler().  This if statement is redundant.

Thanks for spotting this, I'll drop it in v3.

Max

  reply	other threads:[~2014-06-20 17:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-18 19:06 [Qemu-devel] [PATCH v2 0/3] nbd: Adapt for dataplane Max Reitz
2014-06-18 19:06 ` [Qemu-devel] [PATCH v2 1/3] nbd: Drop nbd_can_read() Max Reitz
2014-06-19  3:58   ` Stefan Hajnoczi
2014-06-20 17:04     ` Max Reitz [this message]
2014-06-19  8:44   ` Paolo Bonzini
2014-06-20 17:04     ` Max Reitz
2014-06-18 19:06 ` [Qemu-devel] [PATCH v2 2/3] block: Add AIO context notifiers Max Reitz
2014-06-19  4:01   ` Stefan Hajnoczi
2014-06-18 19:06 ` [Qemu-devel] [PATCH v2 3/3] nbd: Follow the BDS' AIO context Max Reitz
2014-06-19  4:01   ` Stefan Hajnoczi

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=53A469B6.4040708@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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).