[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 1/4] Add qapi for block error injection
From: |
Tony Asleson |
Subject: |
Re: [RFC 1/4] Add qapi for block error injection |
Date: |
Fri, 20 Sep 2019 10:17:37 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/20/19 4:03 AM, Philippe Mathieu-Daudé wrote:
> Hi Tony,
Hi Phil
>
> On 9/19/19 9:48 PM, Tony Asleson wrote:
...
>> +void media_error_delete(const char *device_id, uint64_t lba)
>
> Can you explain the goal of this function? I don't understand it from
> the hardware PoV. Or is it a simple code cleanup function?
It's just a way to do clean up. I actually used it during development
as the Linux kernel can get very unresponsive when doing error retries ,
so I removed the error to allow things to proceed again.
> Once hw starts to break, it is unlikely it recovers magically to a
> previous sane state...
>
> In real world, block hardware starts to fail, controller notice
> inconsistency and set some bits, the controller driver react.
> Eventually the hw will still be used, with the failing block avoided.
This is probably the most common case that people are familiar with, a
sector that goes bad and persists.
In rotating magnetic media devices, you can have a media error if a
write was interrupted by a power failure. The sector has part of the
new write and part of the old write, CRC check fails and ECC is unable
to correct. This can be corrected by having the host re-write the sector.
You can also have an intermittent read error if you have a transient
media problem, eg. a small particulate is moving around on the disk
surface (ransient thermal asperity, instead of persistent).
Depending on disk type (SCSI/SATA) and firmware features, the disk may
auto-reassign the block when it discovers that it had to go through lots
of recovery to retrieve the data or it may require the initiator to
issue a reassign blocks command. In both cases the lba replacement is
ready to use.
> What do you think? How is your current use case setup?
Eventually I think it would be good to model some or all of these other
error scenarios I've outlined above.
>
> Thanks,
Thank you!
-Tony
- [RFC 4/4] ahci media error reporting, (continued)
- [RFC 4/4] ahci media error reporting, Tony Asleson, 2019/09/19
- Re: [RFC 4/4] ahci media error reporting, John Snow, 2019/09/19
- Re: [RFC 4/4] ahci media error reporting, Kevin Wolf, 2019/09/20
- Re: [RFC 4/4] ahci media error reporting, John Snow, 2019/09/20
- Re: [RFC 4/4] ahci media error reporting, Tony Asleson, 2019/09/20
- Re: [RFC 4/4] ahci media error reporting, John Snow, 2019/09/20
[RFC 1/4] Add qapi for block error injection, Tony Asleson, 2019/09/19
[RFC 2/4] SCSI media error reporting, Tony Asleson, 2019/09/19
[RFC 3/4] NVMe media error reporting, Tony Asleson, 2019/09/19
Re: [RFC 0/4] POC: Generating realistic block errors, Kevin Wolf, 2019/09/20
Re: [RFC 0/4] POC: Generating realistic block errors, Stefan Hajnoczi, 2019/09/20