Re: How to convert I/O iterators to iterators, sglists and RDMA lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Howells <dhowells@xxxxxxxxxx> 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





[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux