lkml.org 
[lkml]   [2022]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: How to convert I/O iterators to iterators, sglists and RDMA lists
Date
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

\
 
 \ /
  Last update: 2022-11-04 19:48    [W:0.135 / U:0.960 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site