aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-10-20 13:16:24 +0200
committerKevin Wolf <kwolf@redhat.com>2011-10-21 17:34:14 +0200
commit8b94ff85737062876c03e7506abb500521c749b9 (patch)
tree5bb67bd0896bb49a064e041c30cf61d2d4ce0a40 /block.c
parente183ef75cc28d31addbb937a4680090495786944 (diff)
block: change flush to co_flush
Since coroutine operation is now mandatory, convert all bdrv_flush implementations to coroutines. For qcow2, this means taking the lock. Other implementations are simpler and just forward bdrv_flush to the underlying protocol, so they can avoid the lock. The bdrv_flush callback is then unused and can be eliminated. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/block.c b/block.c
index 28508f21d1..81fb709011 100644
--- a/block.c
+++ b/block.c
@@ -2892,8 +2892,6 @@ int coroutine_fn bdrv_co_flush(BlockDriverState *bs)
qemu_coroutine_yield();
return co.ret;
}
- } else if (bs->drv->bdrv_flush) {
- return bs->drv->bdrv_flush(bs);
} else {
/*
* Some block drivers always operate in either writethrough or unsafe