Il 18/06/2012 19:35, Stefan Hajnoczi ha scritto:
>> > +    /* Use O_DSYNC for write-through caching, no flags for write-back 
>> > caching,
>> > +     * and O_DIRECT for no caching. */
>> > +    if ((bdrv_flags & BDRV_O_NOCACHE))
>> > +        s->open_flags |= O_DIRECT;
>> > +    if (!(bdrv_flags & BDRV_O_CACHE_WB))
>> > +        s->open_flags |= O_DSYNC;
> Paolo has changed this recently, you might need to use
> bs->enable_write_cache instead.

At the protocol (i.e. low-level backend) level you don't need to do
anything really, if you implement bdrv_flush_to_disk correctly.

Looking at BDRV_O_CACHE_WB will do no harm, it's just dead code.

Paolo



Reply via email to