Re: [RFC PATCH 32/35] netfs: Add some more RMW support for ceph

David Howells
2025-03-20T15:26:18Z

Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> wrote:

> > + rreq->buffer.iter = *iter;
>
> The struct iov_iter structure is complex enough and we assign it by value to
> rreq->buffer.iter. So, the initial pointer will not receive any changes
> then. Is it desired behavior here?

Yes. The buffer described by the iterator is going to get partitioned across
a number of subrequests, each of which will get a copy of the iterator
suitably advanced and truncated. As they may run in parallel, there's no way
for them to share the original iterator.

David