Lines Matching refs:page
332 * Release the caching state associated with a page, if the page isn't busy
334 * - Returns true (can release page) or false (page busy).
336 int nfs_fscache_release_page(struct page *page, gfp_t gfp)
338 if (PageFsCache(page)) {
339 struct fscache_cookie *cookie = nfs_i_fscache(page->mapping->host);
343 cookie, page, NFS_I(page->mapping->host));
345 if (!fscache_maybe_release_page(cookie, page, gfp))
348 nfs_inc_fscache_stats(page->mapping->host,
356 * Release the caching state associated with a page if undergoing complete page
359 void __nfs_fscache_invalidate_page(struct page *page, struct inode *inode)
366 cookie, page, NFS_I(inode));
368 fscache_wait_on_page_write(cookie, page);
370 BUG_ON(!PageLocked(page));
371 fscache_uncache_page(cookie, page);
372 nfs_inc_fscache_stats(page->mapping->host,
377 * Handle completion of a page being read from the cache.
380 static void nfs_readpage_from_fscache_complete(struct page *page,
386 page, context, error);
388 /* if the read completes with an error, we just unlock the page and let
391 SetPageUptodate(page);
392 unlock_page(page);
394 error = nfs_readpage_async(context, page->mapping->host, page);
396 unlock_page(page);
401 * Retrieve a page from fscache
404 struct inode *inode, struct page *page)
410 nfs_i_fscache(inode), page, page->index, page->flags, inode);
413 page,
419 case 0: /* read BIO submitted (page in fscache) */
426 case -ENODATA: /* page not in cache */
478 "NFS: nfs_getpages_from_fscache: no page: %d\n", ret);
490 * Store a newly fetched page in fscache
491 * - PG_fscache must be set on the page
493 void __nfs_readpage_to_fscache(struct inode *inode, struct page *page, int sync)
499 nfs_i_fscache(inode), page, page->index, page->flags, sync);
501 ret = fscache_write_page(nfs_i_fscache(inode), page,
505 page, page->index, page->flags, ret);
508 fscache_uncache_page(nfs_i_fscache(inode), page);