From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvsk1-0000H5-K2 for qemu-devel@nongnu.org; Sat, 14 Jun 2014 14:31:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wvsju-00041s-Pz for qemu-devel@nongnu.org; Sat, 14 Jun 2014 14:31:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wvsju-00041d-H1 for qemu-devel@nongnu.org; Sat, 14 Jun 2014 14:31:42 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5EIVeNr009503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 14 Jun 2014 14:31:41 -0400 Message-ID: <539C9507.7010106@redhat.com> Date: Sat, 14 Jun 2014 20:31:35 +0200 From: Max Reitz MIME-Version: 1.0 References: <1402698641-4911-1-git-send-email-mreitz@redhat.com> <1402698641-4911-2-git-send-email-mreitz@redhat.com> <539C0071.6040709@redhat.com> In-Reply-To: <539C0071.6040709@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: Paolo Bonzini , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi On 14.06.2014 09:57, Paolo Bonzini wrote: > 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. Oh, right, thanks. Max