From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YtA1H-0008Ow-Uu for qemu-devel@nongnu.org; Fri, 15 May 2015 03:26:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YtA1F-0006JE-9k for qemu-devel@nongnu.org; Fri, 15 May 2015 03:26:55 -0400 Sender: Paolo Bonzini Message-ID: <55559FB9.2000100@redhat.com> Date: Fri, 15 May 2015 09:26:49 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1431669868-26804-1-git-send-email-famz@redhat.com> <1431669868-26804-13-git-send-email-famz@redhat.com> <55559729.2010809@redhat.com> <20150515070312.GA13255@ad.nay.redhat.com> In-Reply-To: <20150515070312.GA13255@ad.nay.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 12/12] virtio-scsi-dataplane: Add "device IO" op blocker listener List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-block@nongnu.org, armbru@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, Stefan Hajnoczi On 15/05/2015 09:03, Fam Zheng wrote: > On Fri, 05/15 08:50, Paolo Bonzini wrote: >> >> >> On 15/05/2015 08:04, Fam Zheng wrote: >>> @@ -111,6 +111,10 @@ static void virtio_scsi_iothread_handle_ctrl(EventNotifier *notifier) >>> VirtIOSCSI *s = VIRTIO_SCSI(vring->parent); >>> VirtIOSCSIReq *req; >>> >>> + if (s->pause_counter) { >>> + virtio_scsi_stop_ioeventfd(s); >>> + return; >>> + } >>> event_notifier_test_and_clear(notifier); >>> while ((req = virtio_scsi_pop_req_vring(s, vring))) { >>> virtio_scsi_handle_ctrl_req(s, req); >>> @@ -124,6 +128,10 @@ static void virtio_scsi_iothread_handle_event(EventNotifier *notifier) >>> VirtIOSCSI *s = vring->parent; >>> VirtIODevice *vdev = VIRTIO_DEVICE(s); >>> >>> + if (s->pause_counter) { >>> + virtio_scsi_stop_ioeventfd(s); >>> + return; >>> + } >>> event_notifier_test_and_clear(notifier); >>> >>> if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) { >> >> Why are these needed? > > Not strictly. I think it's something like an "assert(!s->pause_counter)" but > said gently. Why be gentle? :) Paolo