erofs-convert-compressed-files-from-readpages-to-readahead.patch removed from -mm tree
The patch titled
Subject: erofs: convert compressed files from readpages to readahead
has been removed from the -mm tree. Its filename was
erofs-convert-compressed-files-from-readpages-to-readahead.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Matthew Wilcox (Oracle)" <[email protected]>
Subject: erofs: convert compressed files from readpages to readahead
Use the new readahead operation in erofs.
Signed-off-by Matthew Wilcox (Oracle) <[email protected]>
Acked-by Gao Xiang <[email protected]>
Reviewed-by Dave Chinner <[email protected]>
Reviewed-by William Kucharski <[email protected]>
Reviewed-by Chao Yu <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Cong Wang <[email protected]>
Cc Darrick J. Wong <[email protected]>
Cc Eric Biggers <[email protected]>
Cc Jaegeuk Kim <[email protected]>
Cc John Hubbard <[email protected]>
Cc Joseph Qi <[email protected]>
Cc Junxiao Bi <[email protected]>
Cc Michal Hocko <[email protected]>
Cc Zi Yan <[email protected]>
Cc Johannes Thumshirn <[email protected]>
Cc Miklos Szeredi <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
fs/erofs/zdata.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-)
fs/erofs/zdata.c renamed from fs/erofs/zdata.c~erofs-convert-compressed-files-from-readpages-to-readahead +8 -17
@@ -1305,28 +1305,23 @@ static bool should_decompress_synchronoureturn nr <= sbi->max_sync_decompress_pages; } -static int z_erofs_readpages (struct file *filp,struct address_space *mapping, -struct list_head *pages,unsigned int nr_pages) +static void z_erofs_readahead (struct readahead_control *rac) { -struct inode *const inode = mapping->host; +struct inode *const inode = rac->mapping->host;struct erofs_sb_info *const sbi =EROFS_I_SB (inode); -bool sync =should_decompress_synchronously (sbi, nr_pages); +bool sync =should_decompress_synchronously (sbi,readahead_count (rac));struct z_erofs_decompress_frontend f =DECOMPRESS_FRONTEND_INIT (inode); -gfp_t gfp =mapping_gfp_constraint (mapping,GFP_KERNEL ); -struct page *head =NULL ; +struct page *page, *head =NULL ;LIST_HEAD (pagepool); -trace_erofs_readpages (mapping->host,lru_to_page (pages)->index, - nr_pages, false); +trace_erofs_readpages (inode,readahead_index (rac), +readahead_count (rac), false); - f.headoffset = (erofs_off_t )lru_to_page (pages)->index <<PAGE_SHIFT ; - -for (; nr_pages; --nr_pages) { -struct page *page =lru_to_page (pages); + f.headoffset =readahead_pos (rac); +while ((page =readahead_page (rac))) {prefetchw (&page->flags); -list_del (&page->lru);/* * A pure asynchronous readahead is indicated if
@@ -1335,11 +1330,6 @@ static int z_erofs_readpages(struct file*/ sync &= !(PageReadahead (page) && !head); -if (add_to_page_cache_lru (page, mapping, page->index, gfp)) { -list_add (&page->lru, &pagepool); -continue ; - }