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