[Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE

2011-03-17 Thread Stefan Hajnoczi
On Thu, Mar 17, 2011 at 9:07 AM, Kevin Wolf wrote: > Am 16.03.2011 18:00, schrieb Stefan Hajnoczi: >> On Wed, Mar 16, 2011 at 2:08 PM, Christoph Hellwig wrote: >>> On Wed, Mar 16, 2011 at 09:42:37AM +, Stefan Hajnoczi wrote: -    writethrough = ((flags & BDRV_O_CACHE_MASK) == 0); +

[Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE

2011-03-17 Thread Kevin Wolf
Am 16.03.2011 18:00, schrieb Stefan Hajnoczi: > On Wed, Mar 16, 2011 at 2:08 PM, Christoph Hellwig wrote: >> On Wed, Mar 16, 2011 at 09:42:37AM +, Stefan Hajnoczi wrote: >>> -writethrough = ((flags & BDRV_O_CACHE_MASK) == 0); >>> +writethrough = ((flags & (BDRV_O_CACHE_WB | BDRV_O_NO_F

[Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE

2011-03-16 Thread Stefan Hajnoczi
On Wed, Mar 16, 2011 at 2:08 PM, Christoph Hellwig wrote: > On Wed, Mar 16, 2011 at 09:42:37AM +, Stefan Hajnoczi wrote: >> -    writethrough = ((flags & BDRV_O_CACHE_MASK) == 0); >> +    writethrough = ((flags & (BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)) == 0); > > or rather > >        writethrough

[Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE

2011-03-16 Thread Christoph Hellwig
On Wed, Mar 16, 2011 at 09:42:37AM +, Stefan Hajnoczi wrote: > -writethrough = ((flags & BDRV_O_CACHE_MASK) == 0); > +writethrough = ((flags & (BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)) == 0); or rather writethrough = ((flags & (BDRV_O_CACHE_WB) != ); but yes, this code had sneaked

[Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE

2011-03-16 Thread Kevin Wolf
Am 16.03.2011 10:42, schrieb Stefan Hajnoczi: > On Tue, Mar 15, 2011 at 2:11 PM, Christoph Hellwig wrote: >> Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache, >> but no writeback semantics. All existing callers are changed to also >> specify BDRV_O_CACHE_WB to give them writeb

[Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE

2011-03-16 Thread Stefan Hajnoczi
On Tue, Mar 15, 2011 at 2:11 PM, Christoph Hellwig wrote: > Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache, > but no writeback semantics.  All existing callers are changed to also > specify BDRV_O_CACHE_WB to give them writeback semantics. > > Signed-off-by: Christoph Hellwig