summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-09-04 19:01:49 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-11 10:19:46 -0500
commitb2e12bc6e304c17da0bee970fb4776d0731422e6 (patch)
tree5b8bc0ee1ab758a5b68c51e8ba5288f87b36af9c /block_int.h
parentblock: use fdatasync instead of fsync if possible (diff)
downloadqemu-kvm-b2e12bc6e304c17da0bee970fb4776d0731422e6.tar.gz
qemu-kvm-b2e12bc6e304c17da0bee970fb4776d0731422e6.tar.bz2
qemu-kvm-b2e12bc6e304c17da0bee970fb4776d0731422e6.zip
block: add aio_flush operation
Instead stalling the VCPU while serving a cache flush try to do it asynchronously. Use our good old helper thread pool to issue an asynchronous fdatasync for raw-posix. Note that while Linux AIO implements a fdatasync operation it is not useful for us because it isn't actually implement in asynchronous fashion. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block_int.h')
-rw-r--r--block_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block_int.h b/block_int.h
index f95c80b90..8e72abee0 100644
--- a/block_int.h
+++ b/block_int.h
@@ -69,6 +69,8 @@ struct BlockDriver {
BlockDriverAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque);
+ BlockDriverAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs,
+ BlockDriverCompletionFunc *cb, void *opaque);
int (*bdrv_aio_multiwrite)(BlockDriverState *bs, BlockRequest *reqs,
int num_reqs);