[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 24/39] block: always open drivers in writeback mode
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 24/39] block: always open drivers in writeback mode |
Date: |
Fri, 15 Jun 2012 15:33:24 +0200 |
From: Paolo Bonzini <address@hidden>
Formats are entirely in charge of flushes for metadata writes. For
guest-initiated writes, a writethrough cache is faked in the block layer.
So we can always open in writeback mode.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block.c b/block.c
index e4396a6..48528fd 100644
--- a/block.c
+++ b/block.c
@@ -649,12 +649,13 @@ static int bdrv_open_common(BlockDriverState *bs, const
char *filename,
bs->opaque = g_malloc0(drv->instance_size);
bs->enable_write_cache = !!(flags & BDRV_O_CACHE_WB);
+ open_flags = flags | BDRV_O_CACHE_WB;
/*
* Clear flags that are internal to the block layer before opening the
* image.
*/
- open_flags = flags & ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);
+ open_flags &= ~(BDRV_O_SNAPSHOT | BDRV_O_NO_BACKING);
/*
* Snapshots should be writable.
--
1.7.6.5
- [Qemu-devel] [PATCH 25/39] ide: support enable/disable write cache, (continued)
- [Qemu-devel] [PATCH 25/39] ide: support enable/disable write cache, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 20/39] block: flush in writethrough mode after writes, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 36/39] fdc: fix implied seek while there is no media in drive, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 38/39] qemu-iotests: add qcow2.py set-feature-bit command, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 39/39] qemu-iotests: add 036 autoclear feature bit test, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 30/39] qemu-iotests: COW with many AIO requests on the same cluster, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 31/39] qemu-img: document qed format on qemu-img man page, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 35/39] qcow2: fix autoclear image header update, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 37/39] fdc-test: introduced qtest read_without_media, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 28/39] qcow2: Fix avail_sectors in cluster allocation code, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 24/39] block: always open drivers in writeback mode,
Kevin Wolf <=
- [Qemu-devel] [PATCH 33/39] xen: Don't change -drive if=xen device name during machine init, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 29/39] qemu-iotests: Some backing file COW tests, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 26/39] qcow2: always operate caches in writeback mode, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 32/39] block: Replace bdrv_get_format() by bdrv_get_format_name(), Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 34/39] xen: Don't peek behind the BlockDriverState abstraction, Kevin Wolf, 2012/06/15
- [Qemu-devel] [PATCH 27/39] qcow2: Simplify calculation for COW area at the end, Kevin Wolf, 2012/06/15
- Re: [Qemu-devel] [PULL 00/39] Block patches, Anthony Liguori, 2012/06/20