[f2fs-dev] [Bug 206551] Failed to initialize F2FS segment manager (-117)

2020-02-19 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206551 --- Comment #6 from Chao Yu (c...@kernel.org) --- IIRC, in knew bugs, except swap file feature, large_nat_bitmap feature can also damage f2fs metadata (SIT table) (they are all fixed in mainline), did you enable this feature during mkfs/resize?

Re: [f2fs-dev] [PATCH v2] f2fs: introduce DEFAULT_IO_TIMEOUT

2020-02-19 Thread Chao Yu
Hi Jaegeuk, Could you help to adapt this change for f2fs_wait_on_all_pages() manually in your tree? - io_schedule_timeout(HZ/50); + io_schedule_timeout(DEFAULT_IO_TIMEOUT); Thanks, On 2020/2/17 17:45, Chao Yu wrote: > As Geert Uytterhoeven reported: > > for

Re: [f2fs-dev] [PATCH v7 2/8] fs: Add standard casefolding support

2020-02-19 Thread Daniel Rosenberg via Linux-f2fs-devel
On Tue, Feb 11, 2020 at 10:57 PM Eric Biggers wrote: > > Or (just throwing another idea out there) the dentry's name could be copied > to a > temporary buffer in ->d_compare(). The simplest version would be: > > u8 _name[NAME_MAX]; > > memcpy(_name, name, len); > name =

[f2fs-dev] [PATCH v7 20/24] fuse: Convert from readpages to readahead

2020-02-19 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) Reviewed-by: Dave

[f2fs-dev] [PATCH v7 12/24] mm: Add page_cache_readahead_unbounded

2020-02-19 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

[f2fs-dev] [PATCH v7 13/24] fs: Convert mpage_readpages to mpage_readahead

2020-02-19 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) Reviewed-by:

[f2fs-dev] [PATCH v7 02/24] mm: Return void from various readahead functions

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" ondemand_readahead has two callers, neither of which use the return value. That means that both ra_submit and __do_page_cache_readahead() can return void, and we don't need to worry that a present page in the readahead window causes us to return a smaller nr_pages

[f2fs-dev] [PATCH v7 16/24] erofs: Convert compressed files from readpages to readahead

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in erofs. Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Gao Xiang Reviewed-by: Dave Chinner --- fs/erofs/zdata.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git

[f2fs-dev] [PATCH v7 17/24] ext4: Convert from readpages to readahead

2020-02-19 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| 21 + fs/ext4/readpage.c | 22 -- 3 files changed, 18 insertions(+), 28 deletions(-)

[f2fs-dev] [PATCH v7 00/23] Change readahead API

2020-02-19 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

[f2fs-dev] [PATCH v7 11/24] mm: Move end_index check out of readahead loop

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" By reducing nr_to_read, we can eliminate this check from inside the loop. Signed-off-by: Matthew Wilcox (Oracle) --- mm/readahead.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index

[f2fs-dev] [PATCH v7 04/24] mm: Move readahead nr_pages check into read_pages

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Simplify the callers by moving the check for nr_pages and the BUG_ON into read_pages(). Signed-off-by: Matthew Wilcox (Oracle) --- mm/readahead.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c

[f2fs-dev] [PATCH v7 23/24] mm: Document why we don't set PageReadahead

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" If the page is already in cache, we don't set PageReadahead on it. Signed-off-by: Matthew Wilcox (Oracle) --- mm/readahead.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index

[f2fs-dev] [PATCH v7 05/24] mm: Use readahead_control to pass arguments

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" In this patch, only between __do_page_cache_readahead() and read_pages(), but it will be extended in upcoming patches. Also add the readahead_count() accessor. The read_pages() function becomes aops centric, as this makes the most sense by the end of the

[f2fs-dev] [PATCH v7 06/24] mm: Rename various 'offset' parameters to 'index'

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The word 'offset' is used ambiguously to mean 'byte offset within a page', 'byte offset from the start of the file' and 'page offset from the start of the file'. Use 'index' to mean 'page offset from the start of the file' throughout the readahead code.

[f2fs-dev] [PATCH v7 08/24] mm: Remove 'page_offset' from readahead loop

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replace the page_offset variable with 'index + i'. Signed-off-by: Matthew Wilcox (Oracle) --- mm/readahead.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 8a25fc7e2bf2..83df5c061d33 100644 ---

[f2fs-dev] [PATCH v7 10/24] mm: Add readahead address space operation

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This replaces ->readpages with a saner interface: - Return void instead of an ignored error code. - Page cache is already populated with locked pages when ->readahead is called. - New arguments can be passed to the implementation without changing all the

[f2fs-dev] [PATCH v7 14/24] btrfs: Convert from readpages to readahead

2020-02-19 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| 46 + fs/btrfs/extent_io.h|

[f2fs-dev] [PATCH v7 01/24] mm: Move readahead prototypes from mm.h

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" The readahead code is part of the page cache so should be found in the pagemap.h file. force_page_cache_readahead is only used within mm, so move it to mm/internal.h instead. Remove the parameter names where they add no value, and rename the ones which were

[f2fs-dev] [PATCH v7 07/24] mm: rename readahead loop variable to 'i'

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Change the type of page_idx to unsigned long, and rename it -- it's just a loop counter, not a page index. Suggested-by: John Hubbard Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Dave Chinner --- mm/readahead.c | 8 1 file changed, 4

[f2fs-dev] [PATCH v7 22/24] iomap: Convert from readpages to readahead

2020-02-19 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 | 90 +++--- fs/iomap/trace.h | 2 +- fs/xfs/xfs_aops.c | 13 +++---

[f2fs-dev] [PATCH v7 15/24] erofs: Convert uncompressed files from readpages to readahead

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

[f2fs-dev] [PATCH v7 21/24] iomap: Restructure iomap_readpages_actor

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" By putting the 'have we reached the end of the page' condition at the end of the loop instead of the beginning, we can remove the 'submit the last page' code from iomap_readpages(). Also check that iomap_readpage_actor() didn't return 0, which would lead to an

[f2fs-dev] [PATCH v7 24/24] mm: Use memalloc_nofs_save in readahead path

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Ensure that memory allocations in the readahead path do not attempt to reclaim file-backed pages, which could lead to a deadlock. It is possible, though unlikely this is the root cause of a problem observed by Cong Wang. Signed-off-by: Matthew Wilcox (Oracle)

[f2fs-dev] [PATCH v7 09/24] mm: Put readahead pages in cache earlier

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" When populating the page cache for readahead, mappings that use ->readpages must populate the page cache themselves as the pages are passed on a linked list which would normally be used for the page cache's LRU. For mappings that use ->readpage or the upcoming

[f2fs-dev] [PATCH v7 19/24] f2fs: Convert from readpages to readahead

2020-02-19 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

[f2fs-dev] [PATCH v7 18/24] ext4: Pass the inode to ext4_mpage_readpages

2020-02-19 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This function now only uses the mapping argument to look up the inode, and both callers already have the inode, so just pass the inode instead of the mapping. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ext4/ext4.h | 2 +- fs/ext4/inode.c| 4 ++--

[f2fs-dev] [PATCH v7 03/24] mm: Ignore return value of ->readpages

2020-02-19 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) Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Reviewed-by: John Hubbard --- mm/readahead.c | 8 ++--

Re: [f2fs-dev] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread John Hubbard
On 2/19/20 7:01 AM, Matthew Wilcox wrote: > On Wed, Feb 19, 2020 at 06:52:46AM -0800, Christoph Hellwig wrote: >> On Wed, Feb 19, 2020 at 06:41:17AM -0800, Matthew Wilcox wrote: >>> #define readahead_for_each(rac, page) \ >>> while ((page =

Re: [f2fs-dev] [PATCH v3] loop: avoid EAGAIN, if offset or block_size are changed

2020-02-19 Thread Andrew Norrie
Hi, Just checking again the status of this patch? It doesn't look like it's made it into the kernel yet? ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v6 17/19] iomap: Restructure iomap_readpages_actor

2020-02-19 Thread Matthew Wilcox
On Wed, Feb 19, 2020 at 05:40:05PM +1100, Dave Chinner wrote: > Ok, that's what the ctx.cur_page_in_bio check is used to detect i.e. > if we've got a page that the readahead cursor points at, and we > haven't actually added it to a bio, then we can leave it to the > read_pages() to unlock and

Re: [f2fs-dev] [PATCH v6 08/19] mm: Add readahead address space operation

2020-02-19 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 07:10:44PM -0800, Eric Biggers wrote: > > +``readahead`` > > + Called by the VM to read pages associated with the address_space > > + object. The pages are consecutive in the page cache and are > > + locked. The implementation should decrement the page refcount > >

Re: [f2fs-dev] [PATCH 00/44] Manually convert filesystem FS documents to ReST

2020-02-19 Thread Mauro Carvalho Chehab
Em Wed, 19 Feb 2020 02:32:34 -0700 Jonathan Corbet escreveu: > On Tue, 18 Feb 2020 11:04:06 +0100 > Mauro Carvalho Chehab wrote: > > > Then, do a second pass at files outside the new directories (like > > admin-guide), in order to better organize things, eventually splitting > > some files

Re: [f2fs-dev] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread Matthew Wilcox
On Wed, Feb 19, 2020 at 06:52:46AM -0800, Christoph Hellwig wrote: > On Wed, Feb 19, 2020 at 06:41:17AM -0800, Matthew Wilcox wrote: > > #define readahead_for_each(rac, page) \ > > while ((page = readahead_page(rac))) > > > > No more readahead_next() to

Re: [f2fs-dev] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread Christoph Hellwig
On Wed, Feb 19, 2020 at 06:41:17AM -0800, Matthew Wilcox wrote: > #define readahead_for_each(rac, page) \ > while ((page = readahead_page(rac))) > > No more readahead_next() to forget to add to filesystems which don't use > the readahead_for_each()

Re: [f2fs-dev] [PATCH v6 07/19] mm: Put readahead pages in cache earlier

2020-02-19 Thread Matthew Wilcox
On Tue, Feb 18, 2020 at 04:01:43PM -0800, John Hubbard wrote: > How about this instead? It uses the "for" loop fully and more naturally, > and is easier to read. And it does the same thing: > > static inline struct page *readahead_page(struct readahead_control *rac) > { > struct page *page;

Re: [f2fs-dev] [PATCH 00/44] Manually convert filesystem FS documents to ReST

2020-02-19 Thread Jonathan Corbet
On Tue, 18 Feb 2020 11:04:06 +0100 Mauro Carvalho Chehab wrote: > Then, do a second pass at files outside the new directories (like > admin-guide), in order to better organize things, eventually splitting > some files into kAPI, uAPI and/or admin-guide. I'm looking forward to this phase! Yes