aboutsummaryrefslogtreecommitdiff
path: root/posix-aio-compat.h
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 18:43:24 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-07 18:43:24 +0000
commitf141eafe286c785f7e2c1e312a73f90d66bdfb90 (patch)
tree049474e891e06deec79bd3d58d49b49ba627276a /posix-aio-compat.h
parentc87c0672936a5b825c0b95bb1d7f5d6dc92294e4 (diff)
push down vector linearization to posix-aio-compat.c (Christoph Hellwig)
Make all AIO requests vectored and defer linearization until the actual I/O thread. This prepares for using native preadv/pwritev. Also enables asynchronous direct I/O by handling that case in the I/O thread. Qcow and qcow2 propably want to be adopted to directly deal with multi-segment requests, but that can be implemented later. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7020 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'posix-aio-compat.h')
-rw-r--r--posix-aio-compat.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/posix-aio-compat.h b/posix-aio-compat.h
index a1cdfd7f1f..1c5dcbd920 100644
--- a/posix-aio-compat.h
+++ b/posix-aio-compat.h
@@ -27,11 +27,18 @@
struct qemu_paiocb
{
int aio_fildes;
- void *aio_buf;
+ union {
+ struct iovec *aio_iov;
+ void *aio_ioctl_buf;
+ };
+ int aio_niov;
size_t aio_nbytes;
#define aio_ioctl_cmd aio_nbytes /* for QEMU_PAIO_IOCTL */
int ev_signo;
off_t aio_offset;
+ unsigned aio_flags;
+/* 512 byte alignment required for buffer, offset and length */
+#define QEMU_AIO_SECTOR_ALIGNED 0x01
/* private */
TAILQ_ENTRY(qemu_paiocb) node;