Messages in this thread | | | From | Trond Myklebust <> | Subject | Re: [RFC PATCH] iov_iter: Add an iterator-of-iterators | Date | Wed, 22 Mar 2023 18:47:09 +0000 |
| |
> 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
| |