[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 h...@lst.de 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 |

[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 kw...@redhat.com wrote: Am 16.03.2011 18:00, schrieb Stefan Hajnoczi: On Wed, Mar 16, 2011 at 2:08 PM, Christoph Hellwig h...@lst.de wrote: On Wed, Mar 16, 2011 at 09:42:37AM +, Stefan Hajnoczi wrote: -    writethrough = ((flags

[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 h...@lst.de 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

[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 h...@lst.de 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

[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 in

[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 h...@lst.de 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