From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WviqV-0001HA-BE for qemu-devel@nongnu.org; Sat, 14 Jun 2014 03:58:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WviqL-0004nS-Qf for qemu-devel@nongnu.org; Sat, 14 Jun 2014 03:57:51 -0400 Received: from mail-qa0-x22c.google.com ([2607:f8b0:400d:c00::22c]:58789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WviqL-0004nO-LX for qemu-devel@nongnu.org; Sat, 14 Jun 2014 03:57:41 -0400 Received: by mail-qa0-f44.google.com with SMTP id hw13so3688436qab.17 for ; Sat, 14 Jun 2014 00:57:41 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <539C0071.6040709@redhat.com> Date: Sat, 14 Jun 2014 09:57:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1402698641-4911-1-git-send-email-mreitz@redhat.com> <1402698641-4911-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1402698641-4911-2-git-send-email-mreitz@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] nbd: Drop nbd_can_read() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi Il 14/06/2014 00:30, Max Reitz ha scritto: > +static void nbd_set_handlers(NBDClient *client) > +{ > + if (client->exp && client->exp->ctx) { > + aio_set_fd_handler(client->exp->ctx, client->sock, > + client->can_read ? nbd_read : NULL, > + client->restart_write ? nbd_restart_write : NULL, Instead of client->restart_write you can just use client->send_coroutine. Apart from this, the patch is okay. Paolo > + client); > + } > +} > +