On Thu, Jul 3, 2014 at 6:50 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
> Il 03/07/2014 12:45, Ming Lei ha scritto:
>
>> I think it may be needed:
>>
>> - following requests coming inside handle_notify():
>>          req0, req1, req2-flush, req3
>> - both req0 and req1 queued
>> - start to handle req2-flush
>> - bdrv_co_flush() calls bdrv_co_flush(bs->file), which finally
>> call raw_aio_flush() to send command, but the 1st two requests
>> should have been submitted to fs before the flush action
>
>
> No, bdrv_aio_flush is only guaranteed to flush requests that _completed_
> before it was sent.
>
> Since we haven't yet told the guest that req0 and req1 are complete, there
> is no need to submit them before req2-flush.

You are right, and it is a bit confused to think between device and host,
:-)

Even with O_DIRECT, qemu can be thought as no cache.

Thanks,

Reply via email to