From: Paolo Bonzini <pbonzini@redhat.com>
To: Zhu Lingshan <lszhu@suse.com>, qemu-block@nongnu.org
Cc: pl@kamp.de, qemu-devel@nongnu.org, ronniesahlberg@gmail.com
Subject: Re: [Qemu-devel] [PATCH] send readcapacity10 when readcapacity16 failed
Date: Thu, 7 Jan 2016 11:08:10 +0100 [thread overview]
Message-ID: <568E390A.6070304@redhat.com> (raw)
In-Reply-To: <1451359934-9236-1-git-send-email-lszhu@suse.com>
On 29/12/2015 04:32, Zhu Lingshan wrote:
> When play with Dell MD3000 target, for sure it
> is a TYPE_DISK, but readcapacity16 would fail.
> Then we find that readcapacity10 succeeded. It
> looks like the target just support readcapacity10
> even through it is a TYPE_DISK or have some
> TYPE_ROM characteristics.
>
> This patch can give a chance to send
> readcapacity16 when readcapacity10 failed.
> This patch is not harmful to original pathes
>
> Signed-off-by: Zhu Lingshan <lszhu@suse.com>
> ---
> block/iscsi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/iscsi.c b/block/iscsi.c
> index bd1f1bf..c8d167f 100644
> --- a/block/iscsi.c
> +++ b/block/iscsi.c
> @@ -1243,8 +1243,9 @@ static void iscsi_readcapacity_sync(IscsiLun *iscsilun, Error **errp)
> iscsilun->lbprz = !!rc16->lbprz;
> iscsilun->use_16_for_rw = (rc16->returned_lba > 0xffffffff);
> }
> + break;
> }
> - break;
> + //fall through to try readcapacity10 instead
> case TYPE_ROM:
> task = iscsi_readcapacity10_sync(iscsilun->iscsi, iscsilun->lun, 0, 0);
> if (task != NULL && task->status == SCSI_STATUS_GOOD) {
>
Queued, thanks.
Paolo
prev parent reply other threads:[~2016-01-07 10:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 3:32 [Qemu-devel] [PATCH] send readcapacity10 when readcapacity16 failed Zhu Lingshan
2016-01-05 19:42 ` [Qemu-devel] [Qemu-block] " John Snow
2016-01-05 19:57 ` ronnie sahlberg
2016-01-06 17:57 ` John Snow
2016-01-07 10:07 ` Paolo Bonzini
2016-01-11 8:49 ` Peter Lieven
2016-01-11 9:46 ` Paolo Bonzini
2016-01-07 10:08 ` Paolo Bonzini [this message]
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=568E390A.6070304@redhat.com \
--to=pbonzini@redhat.com \
--cc=lszhu@suse.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.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).