Christoph Hellwig <hch@xxxxxx> wrote: > On Mon, Feb 15, 2021 at 03:44:52PM +0000, David Howells wrote: > > Provide a function, readahead_expand(), that expands the set of pages > > specified by a readahead_control object to encompass a revised area with a > > proposed size and length. > ... > So looking at linux-next this seems to have a user, but that user is > dead wood given that nothing implements ->expand_readahead. Interesting question. Code on my fscache-iter branch does implement this, but I was asked to split the patchset up, so that's not in this subset. > Looking at the code structure I think netfs_readahead and > netfs_rreq_expand is a complete mess and needs to be turned upside > down, that is instead of calling back from netfs_readahead to the > calling file system, split it into a few helpers called by the > caller. > > But even after this can't we just expose the cache granule boundary > to the VM so that the read-ahead request gets setup correctly from > the very beginning? You need to argue this one with Willy. In my opinion, the VM should ask the filesystem and the expansion be done before ->readahead() is called. Willy disagrees, however. David