mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
qcow2: Batch flushes for COW
qcow2 calls bdrv_flush() after performing COW in order to ensure that the L2 table change is never written before the copy is safe on disk. Now that the L2 table is cached, we can wait with flushing until we write out the next L2 table. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
29c1a7301a
commit
3de0a2944b
3 changed files with 19 additions and 4 deletions
|
@ -637,7 +637,7 @@ int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m)
|
|||
* handled.
|
||||
*/
|
||||
if (cow) {
|
||||
bdrv_flush(bs->file);
|
||||
qcow2_cache_depends_on_flush(s->l2_table_cache);
|
||||
}
|
||||
|
||||
qcow2_cache_set_dependency(bs, s->l2_table_cache, s->refcount_block_cache);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue