Re: [RFC PATCH] cifs: Transition from ->readpages() to ->readahead()

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

 



Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> > 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()?

You mean doing this?

		nr_pages = readahead_count(rac) - nr_pages;

that would seem to indicate that the readahead interface is wrong.  Why should
readahead_count() need correction?  I think I can see *why* the batching stuff
is hidden, but it seems that the comment for readahead_count() needs to
mention this if you aren't going to fix it.

Would it be possible to make readahead_count() do:

	return rac->_nr_pages - rac->_batch_count;

maybe?

David

--
Linux-cachefs mailing list
Linux-cachefs@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-cachefs




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]
  Powered by Linux