[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend |
Date: |
Sun, 01 Jul 2012 16:49:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 |
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
- Re: [Qemu-devel] [RFC PATCH 3/3] block: gluster as block backend,
Paolo Bonzini <=