qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/1 V7] VMWare PVSCSI paravirtual device impleme


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/1 V7] VMWare PVSCSI paravirtual device implementation
Date: Fri, 19 Apr 2013 09:58:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]