mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
ext4: readpages() should submit IO as read-ahead
a_ops->readpages() is only ever used for read-ahead. Ensure that we pass this information down to the block layer. Link: http://lkml.kernel.org/r/20180621010725.17813-5-axboe@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Chris Mason <clm@fb.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5e9d398240
commit
ac22b46a0b
3 changed files with 7 additions and 5 deletions
|
@ -3325,7 +3325,8 @@ static int ext4_readpage(struct file *file, struct page *page)
|
|||
ret = ext4_readpage_inline(inode, page);
|
||||
|
||||
if (ret == -EAGAIN)
|
||||
return ext4_mpage_readpages(page->mapping, NULL, page, 1);
|
||||
return ext4_mpage_readpages(page->mapping, NULL, page, 1,
|
||||
false);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -3340,7 +3341,7 @@ ext4_readpages(struct file *file, struct address_space *mapping,
|
|||
if (ext4_has_inline_data(inode))
|
||||
return 0;
|
||||
|
||||
return ext4_mpage_readpages(mapping, pages, NULL, nr_pages);
|
||||
return ext4_mpage_readpages(mapping, pages, NULL, nr_pages, true);
|
||||
}
|
||||
|
||||
static void ext4_invalidatepage(struct page *page, unsigned int offset,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue