[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] ide: ignore retry_unit check for non-retry
Re: [Qemu-devel] [PATCH 2/3] ide: ignore retry_unit check for non-retry operations
Wed, 29 Jun 2016 11:35:04 +0300
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
On 28.06.2016 23:56, Paolo Bonzini wrote:
On 24/06/2016 17:06, Denis V. Lunev wrote:
When doing DMA request ide/core.c will set s->retry_unit to s->unit in
ide_start_dma. When dma completes ide_set_inactive sets retry_unit to -1.
After that ide_flush_cache runs and fails thanks to blkdebug.
ide_flush_cb calls ide_handle_rw_error which asserts that s->retry_unit
== s->unit. But s->retry_unit is still -1 after previous DMA completion
and flush does not use anything related to retry.
Wouldn't the assertion fail for a PIO read/write too? Perhaps
retry_unit should be set to s->unit in ide_transfer_start too.
If PIO follows DMA and fails then yes, it looks like it will trigger an
assert. I am not sure about setting retry_unit in ide_transfer_start. It
looks like currently only DMA I/O entries touch retry_unit at all. Does
that mean that PIO, flush, etc do not support retries by design and we
need to add more exceptions to assert check or is it a real bug in how
retries are initialized?
Re: [Qemu-devel] [PATCH 0/3] block: ignore flush requests when storage is clean, Eric Blake, 2016/06/24