Hanna Czenczek 3d06cea825 util/iov: Make qiov_slice() public
We want to inline qemu_iovec_init_extended() in block/io.c for padding
requests, and having access to qiov_slice() is useful for this.  As a
public function, it is renamed to qemu_iovec_slice().

(We will need to count the number of I/O vector elements of a slice
there, and then later process this slice.  Without qiov_slice(), we
would need to call qemu_iovec_subvec_niov(), and all further
IOV-processing functions may need to skip prefixing elements to
accomodate for a qiov_offset.  Because qemu_iovec_subvec_niov()
internally calls qiov_slice(), we can just have the block/io.c code call
qiov_slice() itself, thus get the number of elements, and also create an
iovec array with the superfluous prefixing elements stripped, so the
following processing functions no longer need to skip them.)

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
Message-Id: <20230411173418.19549-2-hreitz@redhat.com>
2023-06-05 13:11:02 +02:00
..
2023-01-06 00:50:32 +01:00
2023-03-20 12:43:50 +01:00
2023-05-02 12:36:46 -07:00
2023-03-02 19:13:52 -05:00
2023-03-20 12:43:50 +01:00
2023-05-16 15:21:39 -07:00
2023-05-23 15:20:15 +08:00
2020-12-10 12:15:18 -05:00
2023-02-10 14:12:06 +01:00
2020-10-15 16:06:27 +02:00
2023-05-30 15:50:17 +01:00
2022-12-20 17:09:41 -08:00
2023-06-05 13:11:02 +02:00
2022-10-07 12:11:41 +02:00
2022-04-20 10:51:11 -07:00
2019-09-11 08:46:17 +02:00
2023-04-24 11:29:00 +02:00
2020-12-10 17:16:44 +01:00
2022-04-21 17:03:51 +04:00
2023-03-28 15:23:10 -07:00
2023-04-27 16:39:43 +02:00
2023-03-20 12:43:50 +01:00
2023-02-08 07:27:20 +01:00
2023-03-02 19:13:52 -05:00
2021-04-01 15:27:44 +04:00