Disk cache flush support.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1949 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
pbrook 2006-06-04 11:39:07 +00:00
parent 17acfe326c
commit 7a6cba611d
9 changed files with 46 additions and 1 deletions

View file

@ -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