Blame SOURCES/0022-fs-convert-mpage_readpages-to-mpage_readahead.patch

Kmods SIG 50e2b3
From d4388340ae0bc8397ef5b24342279f7739982918 Mon Sep 17 00:00:00 2001
Kmods SIG 50e2b3
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Kmods SIG 50e2b3
Date: Mon, 1 Jun 2020 21:47:02 -0700
Kmods SIG 50e2b3
Subject: [Backport d4388340ae0b] fs: convert mpage_readpages to
Kmods SIG 50e2b3
 mpage_readahead
Kmods SIG 50e2b3
Kmods SIG 50e2b3
Implement the new readahead aop and convert all callers (block_dev,
Kmods SIG 50e2b3
exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6,
Kmods SIG 50e2b3
reiserfs & udf).
Kmods SIG 50e2b3
Kmods SIG 50e2b3
The callers are all trivial except for GFS2 & OCFS2.
Kmods SIG 50e2b3
Kmods SIG 50e2b3
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Kmods SIG 50e2b3
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Kmods SIG 50e2b3
Reviewed-by: Junxiao Bi <junxiao.bi@oracle.com> # ocfs2
Kmods SIG 50e2b3
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> # ocfs2
Kmods SIG 50e2b3
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Kmods SIG 50e2b3
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Kmods SIG 50e2b3
Reviewed-by: Christoph Hellwig <hch@lst.de>
Kmods SIG 50e2b3
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Kmods SIG 50e2b3
Cc: Chao Yu <yuchao0@huawei.com>
Kmods SIG 50e2b3
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Kmods SIG 50e2b3
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Kmods SIG 50e2b3
Cc: Eric Biggers <ebiggers@google.com>
Kmods SIG 50e2b3
Cc: Gao Xiang <gaoxiang25@huawei.com>
Kmods SIG 50e2b3
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Kmods SIG 50e2b3
Cc: Michal Hocko <mhocko@suse.com>
Kmods SIG 50e2b3
Cc: Zi Yan <ziy@nvidia.com>
Kmods SIG 50e2b3
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Kmods SIG 50e2b3
Cc: Miklos Szeredi <mszeredi@redhat.com>
Kmods SIG 50e2b3
Link: http://lkml.kernel.org/r/20200414150233.24495-17-willy@infradead.org
Kmods SIG 50e2b3
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Kmods SIG 50e2b3
---
Kmods SIG 50e2b3
 src/inode.c | 7 +++----
Kmods SIG 50e2b3
 1 file changed, 3 insertions(+), 4 deletions(-)
Kmods SIG 50e2b3
Kmods SIG 50e2b3
diff --git a/src/inode.c b/src/inode.c
Kmods SIG 50e2b3
index 06887492f54b791506d2f7c76eb3ef073b72026d..785ead346543cb54d440ee1797bee941810f72b7 100644
Kmods SIG 50e2b3
--- a/src/inode.c
Kmods SIG 50e2b3
+++ b/src/inode.c
Kmods SIG 50e2b3
@@ -372,10 +372,9 @@ static int exfat_readpage(struct file *file, struct page *page)
Kmods SIG 50e2b3
 	return mpage_readpage(page, exfat_get_block);
Kmods SIG 50e2b3
 }
Kmods SIG 50e2b3
 
Kmods SIG 50e2b3
-static int exfat_readpages(struct file *file, struct address_space *mapping,
Kmods SIG 50e2b3
-		struct list_head *pages, unsigned int nr_pages)
Kmods SIG 50e2b3
+static void exfat_readahead(struct readahead_control *rac)
Kmods SIG 50e2b3
 {
Kmods SIG 50e2b3
-	return mpage_readpages(mapping, pages, nr_pages, exfat_get_block);
Kmods SIG 50e2b3
+	mpage_readahead(rac, exfat_get_block);
Kmods SIG 50e2b3
 }
Kmods SIG 50e2b3
 
Kmods SIG 50e2b3
 static int exfat_writepage(struct page *page, struct writeback_control *wbc)
Kmods SIG 50e2b3
@@ -502,7 +501,7 @@ int exfat_block_truncate_page(struct inode *inode, loff_t from)
Kmods SIG 50e2b3
 
Kmods SIG 50e2b3
 static const struct address_space_operations exfat_aops = {
Kmods SIG 50e2b3
 	.readpage	= exfat_readpage,
Kmods SIG 50e2b3
-	.readpages	= exfat_readpages,
Kmods SIG 50e2b3
+	.readahead	= exfat_readahead,
Kmods SIG 50e2b3
 	.writepage	= exfat_writepage,
Kmods SIG 50e2b3
 	.writepages	= exfat_writepages,
Kmods SIG 50e2b3
 	.write_begin	= exfat_write_begin,
Kmods SIG 50e2b3
-- 
Kmods SIG 50e2b3
2.31.1
Kmods SIG 50e2b3