util/iov: introduce qemu_iovec_init_extended
commitd953169d4840f312d3b9a54952f4a7ccfcb3b311
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Tue, 4 Jun 2019 16:15:03 +0000 (4 19:15 +0300)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 27 Aug 2019 13:52:45 +0000 (27 14:52 +0100)
tree79c227914cced3681a12abfd8c28f143f60419e0
parentdac03af5d5482ec7ee9c23db467bb7230b33c0d9
util/iov: introduce qemu_iovec_init_extended

Introduce new initialization API, to create requests with padding. Will
be used in the following patch. New API uses qemu_iovec_init_buf if
resulting io vector has only one element, to avoid extra allocations.
So, we need to update qemu_iovec_destroy to support destroying such
QIOVs.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20190604161514.262241-2-vsementsov@virtuozzo.com
Message-Id: <20190604161514.262241-2-vsementsov@virtuozzo.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
include/qemu/iov.h
util/iov.c