Re: [RFC PATCH 32/35] netfs: Add some more RMW support for ceph
From: David Howells
Date: Thu Mar 20 2025 - 11:29:45 EST
Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx> 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