|
From: | Dmitry Fleytman |
Subject: | Re: [Qemu-devel] [PATCH 1/1 V7] VMWare PVSCSI paravirtual device implementation |
Date: | Fri, 19 Apr 2013 11:05:29 +0300 |
Il 19/04/2013 09:53, Dmitry Fleytman ha scritto:
> Paolo, thanks for review.The cancel callback should not be run if the command is completed (what
>
> 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?
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;
}pvscsi_complete_request(s, pvscsi_req);
if (pvscsi_req->dev->resetting) {
pvscsi_req->cmp.hostStatus = BTSTAT_BUSRESET;
} else {
pvscsi_req->cmp.hostStatus = BTSTAT_ABORTQUEUE;
}
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |