From 7a6cba611d09f8eccdfc90d5ad3eb03762e60ce9 Mon Sep 17 00:00:00 2001 From: pbrook Date: Sun, 4 Jun 2006 11:39:07 +0000 Subject: Disk cache flush support. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1949 c046a42c-6fe2-441c-8c8c-71466251a162 --- block-qcow.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'block-qcow.c') diff --git a/block-qcow.c b/block-qcow.c index 34026a4f2c..e5b52fb861 100644 --- a/block-qcow.c +++ b/block-qcow.c @@ -693,6 +693,12 @@ int qcow_compress_cluster(BlockDriverState *bs, int64_t sector_num, return 0; } +static void qcow_flush(BlockDriverState *bs) +{ + BDRVQcowState *s = bs->opaque; + fsync(s->fd); +} + BlockDriver bdrv_qcow = { "qcow", sizeof(BDRVQcowState), @@ -702,6 +708,7 @@ BlockDriver bdrv_qcow = { qcow_write, qcow_close, qcow_create, + qcow_flush, qcow_is_allocated, qcow_set_key, qcow_make_empty -- cgit v1.2.3