qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH] send readcapacity10 when readcapac


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] send readcapacity10 when readcapacity16 failed
Date: Thu, 7 Jan 2016 11:07:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]