From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT6DF-00020c-Tu for qemu-devel@nongnu.org; Fri, 19 Apr 2013 03:58:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT6DE-0004OT-VO for qemu-devel@nongnu.org; Fri, 19 Apr 2013 03:58:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT6DE-0004OP-Nh for qemu-devel@nongnu.org; Fri, 19 Apr 2013 03:58:28 -0400 Message-ID: <5170F918.7040006@redhat.com> Date: Fri, 19 Apr 2013 09:58:16 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1366355146-25496-1-git-send-email-dmitry@daynix.com> <1366355146-25496-2-git-send-email-dmitry@daynix.com> <5170F41F.1000307@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1 V7] 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 19/04/2013 09:53, Dmitry Fleytman ha scritto: > Paolo, thanks for review. > > Regarding the change - it's ok with me, but why do one needs this? I > think we always set proper status before request cancellation. > May QEMU call cancel callback on its own? The cancel callback should not be run if the command is completed (what happens is that scsi_req_cancel will call _either_ the complete callback or the cancel callback). However, we had bugs in the past on this and I'm not sure all of them have been stomped. The outer "if" statement is the equivalent of this in virtio-scsi.c if (!req) { return; } if (req->dev->resetting) { ... } So it may even be better if I follow the scheme in virtio-scsi.c and do this: if (r->completed) { return; } if (pvscsi_req->dev->resetting) { pvscsi_req->cmp.hostStatus = BTSTAT_BUSRESET; } else { pvscsi_req->cmp.hostStatus = BTSTAT_ABORTQUEUE; } pvscsi_complete_request(s, pvscsi_req); Paolo