From: Paolo Bonzini <pbonzini@redhat.com>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
Mike Christie <michaelc@cs.wisc.edu>,
Pekka Enberg <penberg@kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Rusty Russell <rusty@rustcorp.com.au>,
"Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH v5 2/3] virtio-scsi: add error handling
Date: Mon, 19 Mar 2012 12:07:25 +0100 [thread overview]
Message-ID: <4F67136D.7080500@redhat.com> (raw)
In-Reply-To: <20120319095529.GA25623@localhost.localdomain>
Il 19/03/2012 10:55, Hu Tao ha scritto:
> + int ret = FAILED;
>
> cmd->comp = ∁
> ret = virtscsi_kick_cmd(vscsi, vscsi->ctrl_vq, cmd,
> sizeof cmd->req.tmf, sizeof cmd->resp.tmf,
> GFP_NOIO);
> if (ret < 0)
> - return FAILED;
> + goto failed;
This will return the errno, not FAILED.
I have already fixed this up locally, though I've been lazy on actually
sending out the fix. I'll do this today.
Paolo
> wait_for_completion(&comp);
> - if (cmd->resp.tmf.response != VIRTIO_SCSI_S_OK &&
> - cmd->resp.tmf.response != VIRTIO_SCSI_S_FUNCTION_SUCCEEDED)
> - return FAILED;
> + if (cmd->resp.tmf.response == VIRTIO_SCSI_S_OK ||
> + cmd->resp.tmf.response == VIRTIO_SCSI_S_FUNCTION_SUCCEEDED)
> + ret = SUCCESS;
>
> - return SUCCESS;
> +failed:
> + mempool_free(cmd, virtscsi_cmd_pool);
> + return ret;
next prev parent reply other threads:[~2012-03-19 11:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 11:15 [PATCH v5 0/3] virtio-scsi driver Paolo Bonzini
2012-02-05 11:16 ` [PATCH v5 1/3] virtio-scsi: first version Paolo Bonzini
2012-02-05 11:16 ` [PATCH v5 2/3] virtio-scsi: add error handling Paolo Bonzini
2012-03-19 9:55 ` Hu Tao
2012-03-19 11:07 ` Paolo Bonzini [this message]
2012-02-05 11:16 ` [PATCH v5 3/3] virtio-scsi: add power management support Paolo Bonzini
2012-02-10 11:00 ` [PATCH v5 0/3] virtio-scsi driver Stefan Hajnoczi
2012-03-30 2:58 ` Hu Tao
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=4F67136D.7080500@redhat.com \
--to=pbonzini@redhat.com \
--cc=hutao@cn.fujitsu.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=mst@redhat.com \
--cc=penberg@kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=stefanha@linux.vnet.ibm.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).