From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USmUO-0000EE-S3 for qemu-devel@nongnu.org; Thu, 18 Apr 2013 06:54:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USmUN-0005Xw-UJ for qemu-devel@nongnu.org; Thu, 18 Apr 2013 06:54:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USmUN-0005Xm-Mq for qemu-devel@nongnu.org; Thu, 18 Apr 2013 06:54:51 -0400 Message-ID: <516FD0ED.1020907@redhat.com> Date: Thu, 18 Apr 2013 12:54:37 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1365446383-11909-1-git-send-email-dmitry@daynix.com> <1365446383-11909-2-git-send-email-dmitry@daynix.com> <51653204.6050909@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1 V6] VMWare PVSCSI paravirtual device implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Fleytman Cc: Yan Vugenfirer , qemu-devel , Anthony Liguori Il 18/04/2013 11:38, Dmitry Fleytman ha scritto: > > > +static void > > +pvscsi_free_queue(PVSCSIRequestList *req_list) > > This shouldn't be needed. > > > > Doesn't one need to clear completion queue on reset command arrival from > driver? > It should happen in qbus_reset_all. The scsi-disk device will cancel pending requests, and these will be moved from the pending_queue to the completion_queue. I think you can call pvscsi_process_completion_queue instead of pvscsi_free_queue. Paolo > > > +{ > > + PVSCSIRequest *pvscsi_req; > > + > > + while (!QTAILQ_EMPTY(req_list)) { > > + pvscsi_req = QTAILQ_FIRST(req_list); > > + QTAILQ_REMOVE(req_list, pvscsi_req, next); > > + g_free(pvscsi_req); > > + } > > +} > > +