From: Paolo Bonzini <pbonzini@redhat.com>
To: Dmitry Fleytman <dmitry@daynix.com>
Cc: Yan Vugenfirer <yan@daynix.com>,
qemu-devel <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH 1/1 V7] VMWare PVSCSI paravirtual device implementation
Date: Fri, 19 Apr 2013 09:58:16 +0200 [thread overview]
Message-ID: <5170F918.7040006@redhat.com> (raw)
In-Reply-To: <CAGHCxhdU-umtw9B4xciaB08OGrbRjcufSU3e=uCZTEC_am6vCg@mail.gmail.com>
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
next prev parent reply other threads:[~2013-04-19 7:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 7:05 [Qemu-devel] [PATCH 0/1 V7] VMWare PVSCSI paravirtual device implementation Dmitry Fleytman
2013-04-19 7:05 ` [Qemu-devel] [PATCH 1/1 " Dmitry Fleytman
2013-04-19 7:37 ` Paolo Bonzini
2013-04-19 7:53 ` Dmitry Fleytman
2013-04-19 7:58 ` Paolo Bonzini [this message]
2013-04-19 8:05 ` Dmitry Fleytman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5170F918.7040006@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=dmitry@daynix.com \
--cc=qemu-devel@nongnu.org \
--cc=yan@daynix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).