Re: [Cluster-devel] [PATCH 01/12] mm: fix a comment in sys_swapon

2020-02-10 Thread Andrew Morton
On Tue, 14 Jan 2020 17:12:14 +0100 Christoph Hellwig wrote: > claim_swapfile now always takes i_rwsem. > > ... > > --- a/mm/swapfile.c > +++ b/mm/swapfile.c > @@ -3157,7 +3157,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, > specialfile, int, swap_flags) > mapping =

[Cluster-devel] [PATCH v5 00/13] Change readahead API

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This series adds a readahead address_space operation to eventually replace the readpages operation. The key difference is that pages are added to the page cache as they are allocated (and then looked up by the filesystem) instead of passing them on a list to the

[Cluster-devel] [PATCH v5 13/13] iomap: Convert from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in iomap. Convert XFS and ZoneFS to use it. Signed-off-by: Matthew Wilcox (Oracle) --- fs/iomap/buffered-io.c | 101 - fs/iomap/trace.h | 2 +- fs/xfs/xfs_aops.c | 13 ++

[Cluster-devel] [PATCH v5 10/13] ext4: Convert from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in ext4 Signed-off-by: Matthew Wilcox (Oracle) --- fs/ext4/ext4.h | 3 +-- fs/ext4/inode.c| 23 ++- fs/ext4/readpage.c | 22 -- 3 files changed, 19 insertions(+), 29 deletions(-)

[Cluster-devel] [PATCH v5 08/13] erofs: Convert uncompressed files from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in erofs Signed-off-by: Matthew Wilcox (Oracle) --- fs/erofs/data.c | 39 +--- fs/erofs/zdata.c | 2 +- include/trace/events/erofs.h | 6 +++--- 3 files changed, 18

[Cluster-devel] [PATCH v5 03/13] mm: Put readahead pages in cache earlier

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" At allocation time, put the pages in the cache unless we're using ->readpages. Signed-off-by: Matthew Wilcox (Oracle) --- mm/readahead.c | 66 -- 1 file changed, 42 insertions(+), 24 deletions(-) diff --git

[Cluster-devel] [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This replaces ->readpages with a saner interface: - Return void instead of an ignored error code. - Pages are already in the page cache when ->readahead is called. - Implementation looks up the pages in the page cache instead of having them passed in a

[Cluster-devel] [PATCH v5 05/13] mm: Add page_cache_readahead_limit

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" ext4 and f2fs have duplicated the guts of the readahead code so they can read past i_size. Instead, separate out the guts of the readahead code so they can call it directly. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ext4/verity.c| 35

[Cluster-devel] [PATCH v5 11/13] f2fs: Convert from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in f2fs Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/data.c | 50 +++-- fs/f2fs/f2fs.h | 5 ++-- include/trace/events/f2fs.h | 6 ++--- 3 files changed, 25

[Cluster-devel] [PATCH v5 07/13] btrfs: Convert from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in btrfs. Add a readahead_for_each_batch() iterator to optimise the loop in the XArray. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/extent_io.c| 48 ++--- fs/btrfs/extent_io.h|

Re: [Cluster-devel] [PATCH v5 04/13] mm: Add readahead address space operation

2020-02-10 Thread Dave Chinner
On Mon, Feb 10, 2020 at 05:03:39PM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > This replaces ->readpages with a saner interface: > - Return void instead of an ignored error code. > - Pages are already in the page cache when ->readahead is called. > - Implementation

[Cluster-devel] [PATCH v5 06/13] fs: Convert mpage_readpages to mpage_readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Implement the new readahead aop and convert all callers (block_dev, exfat, ext2, fat, gfs2, hpfs, isofs, jfs, nilfs2, ocfs2, omfs, qnx6, reiserfs & udf). The callers are all trivial except for GFS2 & OCFS2. Signed-off-by: Matthew Wilcox (Oracle) ---

[Cluster-devel] [PATCH v5 01/13] mm: Fix the return type of __do_page_cache_readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" ra_submit() which is a wrapper around __do_page_cache_readahead() already returns an unsigned long, and the 'nr_to_read' parameter is an unsigned long, so fix __do_page_cache_readahead() to return an unsigned long, even though I'm pretty sure we're not going to

[Cluster-devel] [PATCH v5 02/13] mm: Ignore return value of ->readpages

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" We used to assign the return value to a variable, which we then ignored. Remove the pretence of caring. Signed-off-by: Matthew Wilcox (Oracle) --- mm/readahead.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/readahead.c

[Cluster-devel] [PATCH v5 09/13] erofs: Convert compressed files from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in erofs. Signed-off-by: Matthew Wilcox (Oracle) --- fs/erofs/zdata.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c index

[Cluster-devel] [PATCH v5 12/13] fuse: Convert from readpages to readahead

2020-02-10 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in fuse. Switching away from the read_cache_pages() helper gets rid of an implicit call to put_page(), so we can get rid of the get_page() call in fuse_readpages_fill(). Signed-off-by: Matthew Wilcox (Oracle) --- fs/fuse/file.c