ext4-convert-from-readpages-to-readahead.patch removed from -mm tree
The patch titled
Subject: ext4: convert from readpages to readahead
has been removed from the -mm tree. Its filename was
ext4-convert-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: ext4: convert from readpages to readahead
Use the new readahead operation in ext4
Signed-off-by Matthew Wilcox (Oracle) <[email protected]>
Reviewed-by William Kucharski <[email protected]>
Reviewed-by Eric Biggers <[email protected]>
Cc Chao Yu <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc Cong Wang <[email protected]>
Cc Darrick J. Wong <[email protected]>
Cc Dave Chinner <[email protected]>
Cc Gao Xiang <[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/ext4/ext4.h | 3 +-- fs/ext4/inode.c | 21 +++++++++------------ fs/ext4/readpage.c | 22 ++++++++-------------- 3 files changed, 18 insertions(+), 28 deletions(-)
fs/ext4/ext4.h renamed from fs/ext4/ext4.h~ext4-convert-from-readpages-to-readahead +1 -2
@@ -3318,8 +3318,7 @@ static inline void ext4_set_de_type(stru/* readpages.c */ extern int ext4_mpage_readpages (struct address_space *mapping, -struct list_head *pages,struct page *page, -unsigned nr_pages,bool is_readahead); +struct readahead_control *rac,struct page *page);extern int __init ext4_init_post_read_processing (void );extern void ext4_exit_post_read_processing (void );
fs/ext4/inode.c renamed from fs/ext4/inode.c~ext4-convert-from-readpages-to-readahead +9 -12
@@ -3224,23 +3224,20 @@ static int ext4_readpage(struct file *fi ret =ext4_readpage_inline (inode, page);if (ret == -EAGAIN ) -return ext4_mpage_readpages (page->mapping,NULL , page,1 , - false); +return ext4_mpage_readpages (page->mapping,NULL , page);return ret; } -static int -ext4_readpages (struct file *file,struct address_space *mapping, -struct list_head *pages,unsigned nr_pages) +static void ext4_readahead (struct readahead_control *rac) { -struct inode *inode = mapping->host; +struct inode *inode = rac->mapping->host; -/* If the file has inline data, no need to do readpages. */ +/* If the file has inline data, no need to do readahead. */ if (ext4_has_inline_data (inode)) -return 0 ; +return ; -return ext4_mpage_readpages (mapping, pages,NULL , nr_pages, true); +ext4_mpage_readpages (rac->mapping, rac,NULL ); } static void ext4_invalidatepage(struct page *page, unsigned int offset,
@@ -3605,7 +3602,7 @@ static int ext4_set_page_dirty(struct pastatic const struct address_space_operations ext4_aops = { .readpage = ext4_readpage, - .readpages = ext4_readpages, + .readahead = ext4_readahead, .writepage = ext4_writepage, .writepages = ext4_writepages, .write_begin = ext4_write_begin,
@@ -3622,7 +3619,7 @@ static const struct address_space_operatstatic const struct address_space_operations ext4_journalled_aops = { .readpage = ext4_readpage, - .readpages = ext4_readpages, + .readahead = ext4_readahead, .writepage = ext4_writepage, .writepages = ext4_writepages, .write_begin = ext4_write_begin,
@@ -3638,7 +3635,7 @@ static const struct address_space_operatstatic const struct address_space_operations ext4_da_aops = { .readpage = ext4_readpage, - .readpages = ext4_readpages, + .readahead = ext4_readahead, .writepage = ext4_writepage, .writepages = ext4_writepages, .write_begin = ext4_da_write_begin,
fs/ext4/readpage.c renamed from fs/ext4/readpage.c~ext4-convert-from-readpages-to-readahead +8 -14
@@ -7,8 +7,8 @@* * This was originally taken from fs/mpage.c * -* The intent is the ext4_mpage_readpages() function here is intended -* to replace mpage_readpages() in the general case, not just for +* The ext4_mpage_readpages() function here is intended to +* replace mpage_readahead() in the general case, not just for * encrypted files. It has some limitations (see below), where it * will fall back to read_block_full_page(), but these limitations * should only be hit when page_size != block_size.
@@ -222,8 +222,7 @@ static inline loff_t ext4_readpage_limit }int ext4_mpage_readpages (struct address_space *mapping, -struct list_head *pages,struct page *page, -unsigned nr_pages,bool is_readahead) +struct readahead_control *rac,struct page *page) {struct bio *bio =NULL ;sector_t last_block_in_bio =0 ;
@@ -241,6 +240,7 @@ int ext4_mpage_readpages(struct address_int length;unsigned relative_block =0 ;struct ext4_map_blocks map; +unsigned int nr_pages = rac ?readahead_count (rac) :1 ; map.m_pblk =0 ; map.m_lblk =0 ;
@@ -251,14 +251,9 @@ int ext4_mpage_readpages(struct address_int fully_mapped =1 ;unsigned first_hole = blocks_per_page; -if (pages) { - page =lru_to_page (pages); - +if (rac) { + page =readahead_page (rac);prefetchw (&page->flags); -list_del (&page->lru); -if (add_to_page_cache_lru (page, mapping, page->index, -readahead_gfp_mask (mapping))) - goto next_page; }if (page_has_buffers (page))
@@ -381,7 +376,7 @@ int ext4_mpage_readpages(struct address_ bio->bi_iter.bi_sector = blocks[0 ] << (blkbits -9 ); bio->bi_end_io = mpage_end_io;bio_set_op_attrs (bio,REQ_OP_READ , - is_readahead ?REQ_RAHEAD :0 ); + rac ?REQ_RAHEAD :0 ); } length = first_hole << blkbits;
@@ -406,10 +401,9 @@ int ext4_mpage_readpages(struct address_else unlock_page (page); next_page: -if (pages) +if (rac)put_page (page); } -BUG_ON (pages && !list_empty (pages));if (bio)submit_bio (bio);return 0 ;
_
Patches currently in -mm which might be from [email protected] are
mm-simplify-calling-a-compound-page-destructor.patch ipc-convert-ipcs_idr-to-xarray.patch ipc-convert-ipcs_idr-to-xarray-update.patch