lkml.org 
[lkml]   [2023]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC PATCH] iov_iter: Add an iterator-of-iterators
Date


> On Mar 22, 2023, at 14:15, David Howells <dhowells@redhat.com> wrote:
>
> Trond Myklebust <trondmy@hammerspace.com> wrote:
>
>> Add an enum iter_type for ITER_ITER ? :-)
>
> Well, you asked for it... It's actually fairly straightforward once
> ITER_PIPE is removed.
>
> ---
> iov_iter: Add an iterator-of-iterators
>
> Provide an I/O iterator that takes an array of iterators and iterates over
> them in turn. Then make the sunrpc service code (and thus nfsd) use it.
>
> In this particular instance, the svc_tcp_sendmsg() sets up an array of
> three iterators: once for the marker+header, one for the body and one
> optional one for the tail, then sets msg_iter to be an
> iterator-of-iterators across them.

Cool! This is something that can be used on the receive side as well, so very useful. I can imagine it might also open up a few more use cases for ITER_XARRAY.

Thanks!
Trond

_________________________________
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@hammerspace.com

\
 
 \ /
  Last update: 2023-03-27 01:13    [W:0.069 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site