[Linux-cachefs] [RFC PATCH] cifs: Transition from ->readpages() to ->readahead()
Matthew Wilcox
willy at infradead.org
Mon Jan 24 14:19:57 UTC 2022
On Mon, Jan 24, 2022 at 01:21:51PM +0000, David Howells wrote:
> Transition the cifs filesystem from using the old ->readpages() method to
> using the new ->readahead() method.
>
> For the moment, this removes any invocation of fscache to read data from
> the local cache, leaving that to another patch.
>
> Questions for Willy:
> - Can we get a function to return the number of pages in a readahead
> batch?
>
> - Can we get a function to commit a readahead batch? Currently, this is
> done when we call __readahead_batch(), but that means ractl->_nr_pages
> isn't up to date at the point we need it to be. However, we want to
> check to see if the ractl is empty, then get server credits and only
> *then* call __readahead_batch() as we don't know how big a batch we're
> allowed till we have the credits.
If you insist on using the primitives in a way that nobody else uses
them, you're going to find they don't work. What's wrong with the
way that FUSE uses them in fuse_readahead()?
More information about the Linux-cachefs
mailing list