Stefan Hajnoczi 于2020年9月16日周三 下午6:09写道:
>
> On Sun, Aug 16, 2020 at 04:26:45PM +0800, Li Qiang wrote:
> > Stefan Hajnoczi 于2020年8月12日周三 下午6:52写道:
>
> Thanks for your review!
>
> > > +/* Discard more bytes than vector size */
> > > +iov_random(&iov, &iov_cnt);
> > > +iov_orig = g_memdu
On Sun, Aug 16, 2020 at 04:26:45PM +0800, Li Qiang wrote:
> Stefan Hajnoczi 于2020年8月12日周三 下午6:52写道:
Thanks for your review!
> > +/* Discard more bytes than vector size */
> > +iov_random(&iov, &iov_cnt);
> > +iov_orig = g_memdup(iov, sizeof(iov[0]) * iov_cnt);
> > +iov_tmp = iov;
Stefan Hajnoczi 于2020年8月12日周三 下午6:52写道:
> The iov_discard_front/back() operations are useful for parsing iovecs
> but they modify the array elements. If the original array is needed
> after parsing finishes there is currently no way to restore it.
>
> Although g_memdup() can be used before perfor
The iov_discard_front/back() operations are useful for parsing iovecs
but they modify the array elements. If the original array is needed
after parsing finishes there is currently no way to restore it.
Although g_memdup() can be used before performing destructive
iov_discard_front/back() operation