[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/6] qcow2: flush caches in qcow2_alloc_bytes()
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 3/6] qcow2: flush caches in qcow2_alloc_bytes() |
Date: |
Tue, 19 Feb 2013 16:45:03 +0100 |
It is not completely clear to me what is being flushed in
qcow2_alloc_bytes() but bdrv_flush(bs->file) is probably wrong. At
least the refcount cache should be flushed since this function calls
update_cluster_refcount().
To be on the safe side, call the full bdrv_flush(bs). This flushes all
caches and the underlying file itself.
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 05b5ec9..4ef3dac 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -663,7 +663,7 @@ int64_t qcow2_alloc_bytes(BlockDriverState *bs, int size)
}
}
- bdrv_flush(bs->file);
+ bdrv_flush(bs);
return offset;
}
--
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, 2013/02/19
- [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 <=
- [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