[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/6] qcow2: flush refcount cache correctly in alloc_
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 1/6] qcow2: flush refcount cache correctly in alloc_refcount_block() |
Date: |
Tue, 19 Feb 2013 16:45:01 +0100 |
update_refcount() affects the refcount cache, it does not write to disk.
Therefore bdrv_flush(bs->file) does nothing. We need to flush the
refcount cache in order to write out the refcount updates!
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/qcow2-refcount.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index bc1784c..05b5ec9 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -237,7 +237,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
goto fail_block;
}
- bdrv_flush(bs->file);
+ qcow2_cache_flush(bs, s->refcount_block_cache);
/* Initialize the new refcount block only after updating its refcount,
* update_refcount uses the refcount cache itself */
--
1.8.1.2
- [Qemu-devel] [PATCH 0/6] qcow2: cache flush fixes and performance improvements, Stefan Hajnoczi, 2013/02/19
- [Qemu-devel] [PATCH 1/6] qcow2: flush refcount cache correctly in alloc_refcount_block(),
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 4/6] qcow2: flush in qcow2_update_snapshot_refcount(), Stefan Hajnoczi, 2013/02/19
- [Qemu-devel] [PATCH 2/6] qcow2: flush refcount cache correctly in qcow2_write_snapshots(), Stefan Hajnoczi, 2013/02/19
- [Qemu-devel] [PATCH 5/6] qcow2: drop flush in update_cluster_refcount(), Stefan Hajnoczi, 2013/02/19
- [Qemu-devel] [PATCH 3/6] qcow2: flush caches in qcow2_alloc_bytes(), Stefan Hajnoczi, 2013/02/19
- [Qemu-devel] [PATCH 6/6] qcow2: drop unnecessary flush in qcow2_update_snapshot_refcount(), Stefan Hajnoczi, 2013/02/19
- Re: [Qemu-devel] [PATCH 0/6] qcow2: cache flush fixes and performance improvements, Eric Blake, 2013/02/19
- Re: [Qemu-devel] [PATCH 0/6] qcow2: cache flush fixes and performance improvements, Kevin Wolf, 2013/02/20