Messages in this thread | | | From | David Howells <> | Subject | Re: How to convert I/O iterators to iterators, sglists and RDMA lists | Date | Fri, 04 Nov 2022 18:47:23 +0000 |
| |
David Howells <dhowells@redhat.com> wrote:
> > What protects pages involved in ITER_XARRAY iterator created by > > afs_read_dir()? Note that we are not guaranteed inode_lock() on > > the directory in question... > > Yeah - that needs fixing. The size of the data can change, but I don't update > the iterator.
Actually, no. The iterator is the output buffer for afs_fetch_data(). If the buffer turned out to be too small we drop the validate_lock and go round and try again.
req->actual_len and req->file_size are updated by afs_fetch_data() from the RPC reply. req->len tells the RPC delivery code how big the buffer is (which we don't have to fill if there's less data available than we have buffer space).
David
| |