qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/6] change vectored block I/O API to plain iove


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 2/6] change vectored block I/O API to plain iovecs
Date: Sun, 15 Mar 2009 14:42:05 +0200
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Christoph Hellwig wrote:
QEMUIOVector is a useful helper for the dma-helper.c internals but for a generic
block API it's more of hindrance.  Some top-level consumers like virtio-blk
already have the plain iovec and segment number at hand and can pass it down
directly, and for those that just have a single element and need to fake up
a vector the plain iovec also is a lot easier.

virtio gets its iovecs through a hacky (and incorrect, try >=4G) method. IMO virtio should be fixed to use the dma api, at which point it will start to use QEMUIOVector anyway,

Last but not leas we want to push down vectored I/O to the lowest level,
and if posix-aio-compat.c wants to stay somewhat true to it's goal of
beeing like an ehanced posix AIO API it should stick to posix types.

Internally yes, but why should bdrv_* not use QEMUIOVector? That API isn't very interested in posix.

 static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs,
                                             int64_t sector_num,
-                                            QEMUIOVector *iov,
+                                            struct iovec *iov,
+                                           int nr_iov,
                                             int nb_sectors,
                                             BlockDriverCompletionFunc *cb,
                                             void *opaque,

Note qemu never uses tabs in source code.

--
error compiling committee.c: too many arguments to function





reply via email to

[Prev in Thread] Current Thread [Next in Thread]