From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akuHU-0004S3-JI for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:06:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akuHQ-0000kE-My for qemu-devel@nongnu.org; Tue, 29 Mar 2016 10:06:04 -0400 Sender: Paolo Bonzini References: <1459258923-10319-1-git-send-email-mst@redhat.com> <1459258923-10319-3-git-send-email-mst@redhat.com> From: Paolo Bonzini Message-ID: <56FA8BBA.2070402@redhat.com> Date: Tue, 29 Mar 2016 16:05:46 +0200 MIME-Version: 1.0 In-Reply-To: <1459258923-10319-3-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] virtio-blk: use aio handler for data plane List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , qemu-devel@nongnu.org Cc: Cornelia Huck , Kevin Wolf , Stefan Hajnoczi , qemu-block@nongnu.org On 29/03/2016 15:42, Michael S. Tsirkin wrote: > + if (s->dataplane) { > + /* Some guests kick before setting VIRTIO_CONFIG_S_DRIVER_OK so start > + * dataplane here instead of waiting for .set_status(). > + */ > + if (!s->dataplane_started) { > + virtio_blk_data_plane_start(s->dataplane); > + } > + return; > + } > + > + virtio_blk_handle_vq(s, vq); Another small comment, this can be written simply as if (s->dataplane) { virtio_blk_data_plane_start(s->dataplane); } else { virtio_blk_handle_vq(s, vq); } Paolo