From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49967) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwBMy-0001qm-0L for qemu-devel@nongnu.org; Sat, 23 May 2015 11:29:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwBMt-0000tH-8C for qemu-devel@nongnu.org; Sat, 23 May 2015 11:29:47 -0400 Message-ID: <55609C72.10803@redhat.com> Date: Sat, 23 May 2015 17:27:46 +0200 From: Max Reitz MIME-Version: 1.0 References: <1432102576-6637-1-git-send-email-famz@redhat.com> <1432102576-6637-6-git-send-email-famz@redhat.com> In-Reply-To: <1432102576-6637-6-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 05/13] virtio-blk: Don't handle output when there is "device IO" op blocker List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, jcody@redhat.com, armbru@redhat.com, Stefan Hajnoczi , amit.shah@redhat.com, pbonzini@redhat.com On 20.05.2015 08:16, Fam Zheng wrote: > virtio-blk now listens to op blocker change of the associated block > backend. > > Up on setting op blocker on BLOCK_OP_TYPE_DEVICE_IO: > > non-dataplane: > 1) Set VirtIOBlock.paused > 2) In virtio_blk_handle_output, do nothing if VirtIOBlock.paused > > dataplane: > 1) Clear the host event notifier > 2) In handle_notify, do nothing if VirtIOBlock.paused > > Up on removing the op blocker: > > non-dataplane: > 1) Clear VirtIOBlock.paused > 2) Schedule a BH on the AioContext of the backend, which calls > virtio_blk_handle_output, so that the previous unhandled kicks can > make progress > > dataplane: > 1) Set the host event notifier > 2) Notify the host event notifier so that unhandled events are > processed > > Signed-off-by: Fam Zheng > --- > hw/block/dataplane/virtio-blk.c | 25 ++++++++++++++++- > hw/block/virtio-blk.c | 59 +++++++++++++++++++++++++++++++++++++++-- > include/hw/virtio/virtio-blk.h | 8 +++++- > 3 files changed, 88 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz