aboutsummaryrefslogtreecommitdiff
path: root/block/raw-posix-aio.h
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/raw-posix-aio.h
parent6f1953c4c14566d3303709869fd26201828b3ccf (diff)
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/raw-posix-aio.h')
-rw-r--r--block/raw-posix-aio.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/raw-posix-aio.h b/block/raw-posix-aio.h
index 244bc8b798..a2d4348ee2 100644
--- a/block/raw-posix-aio.h
+++ b/block/raw-posix-aio.h
@@ -17,8 +17,9 @@
#define QEMU_AIO_READ 0x0001
#define QEMU_AIO_WRITE 0x0002
#define QEMU_AIO_IOCTL 0x0004
+#define QEMU_AIO_FLUSH 0x0008
#define QEMU_AIO_TYPE_MASK \
- (QEMU_AIO_READ|QEMU_AIO_WRITE|QEMU_AIO_IOCTL)
+ (QEMU_AIO_READ|QEMU_AIO_WRITE|QEMU_AIO_IOCTL|QEMU_AIO_FLUSH)
/* AIO flags */
#define QEMU_AIO_MISALIGNED 0x1000