diff options
Diffstat (limited to 'block-qcow.c')
-rw-r--r-- | block-qcow.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 |