[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH] send readcapacity10 when readcapac
From: |
Peter Lieven |
Subject: |
Re: [Qemu-devel] [Qemu-block] [PATCH] send readcapacity10 when readcapacity16 failed |
Date: |
Mon, 11 Jan 2016 09:49:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Am 07.01.2016 um 11:07 schrieb Paolo Bonzini:
>
> On 06/01/2016 18:57, John Snow wrote:
>> Ronnie: Thanks for the explanation!
>>
>> Zhu: In light of this, can the patch be reworked slightly to explicitly
>> check *why* READCAPACITY16 failed and only attempt the READCAPACITY10 as
>> a fallback if it receives INVALID_OPCODE?
>>
>> If it fails for any other reason it's probably best to report the error
>> and let QEMU decide what to do about it.
> Any other failure probably would happen for READ CAPACITY(10) as well, so
> it's okay to ignore it for READ CAPACITY(16).
>
> Zhu's patch matches what Linux does by default, it seems okay. The only
> change needed is to retry READ CAPACITY(16) if there is a UNIT ATTENTION
> sense:
>
> + if (task != NULL && task->status == SCSI_STATUS_CHECK_CONDITION
> + && task->sense.key == SCSI_SENSE_UNIT_ATTENTION) {
> + break;
> + }
>
> Paolo
Paolo, Ronnie, do you know what Readcapacity(10) returns if the target
blocks count is greater than what can be described in 32bit?
Anyway, is there a new version of this patch? I would also like to have a look
before it is commited.
Thanks,
Peter