On 04/11/2012 03:32 PM, Paolo Bonzini wrote:

> Il 11/04/2012 04:42, Liu Yuan ha scritto:
>>  1) if we use bdrv_close(), we rely on the assumption that backend
>> storage will do flushing while interpreting this operation. This
>> assumption might not always hold, for e.g, current sheepdog doesn't do
>> flushing for bdrv_close(). So bdrv_flush() will be the safest method to
>> push the data back.
>>  2) explicit flushing is more maintainable, we don't need to guess if it
>> does flushing internally if we use other function that flush implicitly.
> 
> I think it is reasonable semantics that closing gets all data to storage.
> 


Yes, but if the buggy block driver dose not assure us of this semantics,
we'll risk to lose data.

Thanks,
Yuan

Reply via email to