From f141eafe286c785f7e2c1e312a73f90d66bdfb90 Mon Sep 17 00:00:00 2001 From: aliguori Date: Tue, 7 Apr 2009 18:43:24 +0000 Subject: 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 Signed-off-by: Anthony Liguori git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7020 c046a42c-6fe2-441c-8c8c-71466251a162 --- posix-aio-compat.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'posix-aio-compat.h') diff --git a/posix-aio-compat.h b/posix-aio-compat.h index a1cdfd7..1c5dcbd 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; -- cgit v1.1