Am 24.10.2011 11:26, schrieb Paolo Bonzini:
> On 10/24/2011 10:54 AM, Kevin Wolf wrote:
>>>  I don't know... checking BDRV_O_NO_FLUSH in the drivers rather than in
>>>  the generic code sounds like a layering violation.  Perhaps what you're
>>>  after is a separation of bdrv_co_flush from bdrv_{,co_,aio_}fsync?  Then
>>>  BDRV_O_NO_FLUSH (better renamed to BDRV_O_NO_FSYNC...) would only
>>>  inhibit the latter.
>>
>> Why? All other cache related BDRV_O_* flags are interpreted by the block
>> drivers, so why should BDRV_O_NO_FLUSH be special?
> 
> You're changing the API and asking for possibly non-trivial changes in 
> all protocol drivers, in order to accomodate semantics that all format 
> drivers potentially could desire.  So I wonder if the problem is simply 
> that the current API is not expressive enough.

Can you think of any cases where a caller would want to invoke
bdrv_flush, but not bdrv_fsync? (The other way round it makes even less
sense)

Kevin

Reply via email to