From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgW05-0006XF-Qd for qemu-devel@nongnu.org; Thu, 06 Dec 2012 02:36:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TgW01-0000ew-Ja for qemu-devel@nongnu.org; Thu, 06 Dec 2012 02:36:05 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:47480) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TgW01-0000ej-8d for qemu-devel@nongnu.org; Thu, 06 Dec 2012 02:36:01 -0500 Received: by mail-ee0-f45.google.com with SMTP id d49so3601053eek.4 for ; Wed, 05 Dec 2012 23:36:00 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50C04ADB.9040402@redhat.com> Date: Thu, 06 Dec 2012 08:35:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1354740430-22452-1-git-send-email-stefanha@redhat.com> <1354740430-22452-11-git-send-email-stefanha@redhat.com> In-Reply-To: <1354740430-22452-11-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 10/11] dataplane: add virtio-blk data plane code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Blue Swirl , khoa@us.ibm.com, asias@redhat.com Il 05/12/2012 21:47, Stefan Hajnoczi ha scritto: > + > +/* Block until pending requests have completed > + * > + * The vring continues to be serviced so ensure no new requests will be added > + * to avoid races. > + */ > +void virtio_blk_data_plane_drain(VirtIOBlockDataPlane *s) > +{ > + qemu_mutex_lock(&s->num_reqs_lock); > + while (s->num_reqs > 0) { > + qemu_cond_wait(&s->no_reqs_cond, &s->num_reqs_lock); > + } > + qemu_mutex_unlock(&s->num_reqs_lock); > +} Hi Stefan, so this was not changed from v4? Paolo