Matthew Wilcox wrote:
> > + while ((page = readahead_page(ractl)))
> > + put_page(page);
>
> You don't need this pair of lines (unless I'm missing something).
> read_pages() in mm/readahead.c puts the reference and unlocks any
> pages which are not read by the readahead op. Indeed,
On Wed, Mar 10, 2021 at 04:56:13PM +, David Howells wrote:
> +void netfs_readahead(struct readahead_control *ractl,
> + const struct netfs_read_request_ops *ops,
> + void *netfs_priv)
> +{
> + struct netfs_read_request *rreq;
> + struct page *page;
> +
I'm going to make the code generate more information when warning about a
subread reporting having over-read (see attached).
David
---
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index ce11ca4c32e4..765e88ee132d 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@
Add a pair of helper functions:
(*) netfs_readahead()
(*) netfs_readpage()
to do the work of handling a readahead or a readpage, where the page(s)
that form part of the request may be split between the local cache, the
server or just require clearing, and may be single pages and transparent
4 matches
Mail list logo