On 17.03.23 20:50, Hanna Czenczek wrote:
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.

(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.)

Signed-off-by: Hanna Czenczek<hre...@redhat.com>

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>

--
Best regards,
Vladimir


Reply via email to