Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress

2020-04-14 Thread Sahitya Tummala
On Mon, Apr 13, 2020 at 10:42:37AM -0700, Jaegeuk Kim wrote: > On 04/03, Jaegeuk Kim wrote: > > On 04/03, Jaegeuk Kim wrote: > > > On 04/01, Sahitya Tummala wrote: > > > > Hi Jaegeuk, > > > > > > > > Got it. > > > > The diff below looks good to me. > > > > Would you like me to test it and put a pa

Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress

2020-04-14 Thread Chao Yu
On 2020/4/14 1:42, Jaegeuk Kim wrote: > On 04/03, Jaegeuk Kim wrote: >> On 04/03, Jaegeuk Kim wrote: >>> On 04/01, Sahitya Tummala wrote: Hi Jaegeuk, Got it. The diff below looks good to me. Would you like me to test it and put a patch for this? >>> >>> Sahitya, Chao, >>> >

Re: [f2fs-dev] [question] ZBC/ZAC Offline/read-only zone support

2020-04-14 Thread Chao Yu
Hi, On 2020/4/14 12:23, Tim Walker wrote: > Hello- > > I am trying to determine how f2fs handles an offline (or read-only) zone when > it is backed by a host-managed SMR HDD. I haven't been able to find any > specific code path that places an offline zone into a separate list, or a > path that

Re: [f2fs-dev] [PATCH] f2fs: prevent meta updates while checkpoint is in progress

2020-04-14 Thread Jaegeuk Kim
On 04/13, Jaegeuk Kim wrote: > On 04/03, Jaegeuk Kim wrote: > > On 04/03, Jaegeuk Kim wrote: > > > On 04/01, Sahitya Tummala wrote: > > > > Hi Jaegeuk, > > > > > > > > Got it. > > > > The diff below looks good to me. > > > > Would you like me to test it and put a patch for this? > > > > > > Sahit

Re: [f2fs-dev] [question] ZBC/ZAC Offline/read-only zone support

2020-04-14 Thread Jaegeuk Kim
On 04/14, Tim Walker wrote: > Hello- > > I am trying to determine how f2fs handles an offline (or read-only) zone when > it is backed by a host-managed SMR HDD. I haven't been able to find any > specific code path that places an offline zone into a separate list, or a > path that checks the zon

[f2fs-dev] [PATCH v11 20/25] ext4: Convert from readpages to readahead

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in ext4 Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Reviewed-by: Eric Biggers --- fs/ext4/ext4.h | 3 +-- fs/ext4/inode.c| 21 + fs/ext4/readpage.c | 22

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

2020-04-14 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 v11 05/25] mm: Add new readahead_control API

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Filesystems which implement the upcoming ->readahead method will get their pages by calling readahead_page() or readahead_page_batch(). These functions support large pages, even though none of the filesystems to be converted do yet. Signed-off-by: Matthew Wilcox (

[f2fs-dev] [PATCH v11 22/25] f2fs: Convert from readpages to readahead

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Use the new readahead operation in f2fs Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski Reviewed-by: Eric Biggers Reviewed-by: Chao Yu Acked-by: Jaegeuk Kim --- fs/f2fs/data.c | 47 +++-- inc

[f2fs-dev] [PATCH v11 17/25] btrfs: Convert from readpages to readahead

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Implement the new readahead method in btrfs using the new readahead_page_batch() function. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: William Kucharski --- fs/btrfs/extent_io.c | 43 --- fs/btrfs/extent_io.h | 3

[f2fs-dev] [PATCH v11 21/25] ext4: Pass the inode to ext4_mpage_readpages

2020-04-14 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) Reviewed-by: William Kucharski Reviewed-by: Eric Biggers --- f

[f2fs-dev] [PATCH v11 23/25] f2fs: Pass the inode to f2fs_mpage_readpages

2020-04-14 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) Reviewed-by: William Kucharski Reviewed-by: Eric Biggers Review

[f2fs-dev] [PATCH v11 00/25] Change readahead API

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" This series adds a readahead address_space operation to 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 readpages op

[f2fs-dev] [PATCH v11 07/25] mm: Rename various 'offset' parameters to 'index'

2020-04-14 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. Signed-of

[f2fs-dev] [PATCH v11 25/25] iomap: Convert from readpages to readahead

2020-04-14 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) Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: William Kucharski --- fs/iomap/buffered-io.c | 90 +++-

[f2fs-dev] [PATCH v11 14/25] mm: Document why we don't set PageReadahead

2020-04-14 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) Reviewed-by: Christoph Hellwig Reviewed-by: William Kucharski --- mm/readahead.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --gi

[f2fs-dev] [PATCH v11 09/25] mm: Remove 'page_offset' from readahead loop

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Replace the page_offset variable with 'index + i'. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: John Hubbard Reviewed-by: Christoph Hellwig Reviewed-by: William Kucharski --- mm/readahead.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

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

2020-04-14 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 activ

[f2fs-dev] [PATCH v11 12/25] mm: Move end_index check out of readahead loop

2020-04-14 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) Reviewed-by: John Hubbard Reviewed-by: William Kucharski --- mm/readahead.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) d

[f2fs-dev] [PATCH v11 18/25] erofs: Convert uncompressed files from readpages to readahead

2020-04-14 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: William Kucharski Reviewed-by: Chao Yu --- fs/erofs/data.c | 39 +--- fs/erofs/zdata.c |

[f2fs-dev] [PATCH v11 19/25] erofs: Convert compressed files from readpages to readahead

2020-04-14 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 Reviewed-by: William Kucharski Reviewed-by: Chao Yu --- fs/erofs/zdata.c | 29 + 1 file changed, 9 inse

[f2fs-dev] [PATCH v11 16/25] fs: Convert mpage_readpages to mpage_readahead

2020-04-14 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: Jun

[f2fs-dev] [PATCH v11 11/25] mm: Add readahead address space operation

2020-04-14 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 f

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

2020-04-14 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 Reviewed-by: William Kucharski --

[f2fs-dev] [PATCH v11 15/25] mm: Use memalloc_nofs_save in readahead path

2020-04-14 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) Re

[f2fs-dev] [PATCH v11 13/25] mm: Add page_cache_readahead_unbounded

2020-04-14 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) Reviewed-by: Christoph Hellwig Reviewed-by: Will

[f2fs-dev] [PATCH v11 24/25] fuse: Convert from readpages to readahead

2020-04-14 Thread Matthew Wilcox
From: "Matthew Wilcox (Oracle)" Implement the new readahead operation in fuse by using __readahead_batch() to fill the array of pages in fuse_args_pages directly. This lets us inline fuse_readpages_fill() into fuse_readahead(). Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Dave Chinner

[f2fs-dev] [PATCH v11 10/25] mm: Put readahead pages in cache earlier

2020-04-14 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 ->r

[f2fs-dev] [PATCH v11 08/25] mm: rename readahead loop variable to 'i'

2020-04-14 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 Reviewed-by: William Kucharski --- mm/readahead.c | 8 --

[f2fs-dev] [PATCH v11 06/25] mm: Use readahead_control to pass arguments

2020-04-14 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. The read_pages() function becomes aops centric, as this makes the most sense by the end of the patchset. Signed-off-by: Matthew Wilcox (Oracle)

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

2020-04-14 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) Reviewed-by: Zi Yan Reviewed-by: John Hubbard Reviewed-by: Christoph Hellwig Reviewed-by: William Kucharski --- mm/readahead.c | 12

Re: [f2fs-dev] [PATCH v3] f2fs: fix long latency due to discard during umount

2020-04-14 Thread Jaegeuk Kim
Hi Sahitya, Could you please post the revised patch? Thanks, On 04/13, Jaegeuk Kim wrote: > On 04/09, Sahitya Tummala wrote: > > On Wed, Apr 08, 2020 at 07:29:28PM -0700, Jaegeuk Kim wrote: > > > On 04/08, Sahitya Tummala wrote: > > > > Hi Jaegeuk, > > > > > > > > On Fri, Apr 03, 2020 at 10:19:

Re: [f2fs-dev] [PATCH v11 05/25] mm: Add new readahead_control API

2020-04-14 Thread Andrew Morton
On Tue, 14 Apr 2020 08:02:13 -0700 Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Filesystems which implement the upcoming ->readahead method will get > their pages by calling readahead_page() or readahead_page_batch(). > These functions support large pages, even though none of the

[f2fs-dev] [PATCH v2] f2fs: fix to avoid page count leak

2020-04-14 Thread Chao Yu
In f2fs_read_data_pages(), once we add page into radix tree, we need to release reference count of that page, however when f2fs_read_multi_pages() fails, we didn't handle that case correctly, fix it. Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu --- v2: - add Fixes

Re: [f2fs-dev] [PATCH v11 05/25] mm: Add new readahead_control API

2020-04-14 Thread Matthew Wilcox
On Tue, Apr 14, 2020 at 06:17:05PM -0700, Andrew Morton wrote: > On Tue, 14 Apr 2020 08:02:13 -0700 Matthew Wilcox wrote: > > From: "Matthew Wilcox (Oracle)" > > > > Filesystems which implement the upcoming ->readahead method will get > > their pages by calling readahead_page() or readahead_page

Re: [f2fs-dev] [question] ZBC/ZAC Offline/read-only zone support

2020-04-14 Thread Tim Walker
From: Jaegeuk Kim Sent: Tuesday, April 14, 2020 8:09 AM To: Tim Walker Cc: linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [question] ZBC/ZAC Offline/read-only zone support   On 04/14, Tim Walker wrote: > Hello- > > I am trying to determine how f2fs handles

Re: [f2fs-dev] [question] ZBC/ZAC Offline/read-only zone support

2020-04-14 Thread Tim Walker
From: Chao Yu Sent: Tuesday, April 14, 2020 5:50 AM To: Tim Walker ; linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [question] ZBC/ZAC Offline/read-only zone support   Hi, On 2020/4/14 12:23, Tim Walker wrote: > Hello- > > I am trying to determine how f2fs handles

[f2fs-dev] [PATCH] fsck.f2fs: fix to avoid overflow during print_inode_info()

2020-04-14 Thread Chao Yu
While dumping files during fsck, print_inode_info() didn't check sanity of inode, so insane i_extra_isize could cause overflow when printing i_addr, to avoid that, let's add a check condition. Signed-off-by: Chao Yu --- fsck/mount.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) di

Re: [f2fs-dev] Bug#955549: f2fs-tools: fsck.f2fs segfaults

2020-04-14 Thread Chao Yu
On 2020/4/10 7:32, Adam Borowski wrote: > On Tue, Apr 07, 2020 at 06:22:19PM +0800, Chao Yu wrote: >> I figured out two patches to fix segfault issues, could you please have >> a try: >> >> fsck.f2fs: fix to check validation of i_xattr_nid >> fsck.f2fs: fix to check validation of block ad

[f2fs-dev] [PATCH v4] f2fs: fix long latency due to discard during umount

2020-04-14 Thread Sahitya Tummala
F2FS already has a default timeout of 5 secs for discards that can be issued during umount, but it can take more than the 5 sec timeout if the underlying UFS device queue is already full and there are no more available free tags to be used. Fix this by submitting a small batch of discard requests s

[f2fs-dev] [PATCH] f2fs: report the discard cmd errors properly

2020-04-14 Thread Sahitya Tummala
In case a discard_cmd is split into several bios, the dc->error must not be overwritten once an error is reported by a bio. Also, move it under dc->lock. Signed-off-by: Sahitya Tummala --- fs/f2fs/segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/segment.c

Re: [f2fs-dev] [PATCH v11 05/25] mm: Add new readahead_control API

2020-04-14 Thread Andrew Morton
On Tue, 14 Apr 2020 19:18:08 -0700 Matthew Wilcox wrote: > On Tue, Apr 14, 2020 at 06:17:05PM -0700, Andrew Morton wrote: > > On Tue, 14 Apr 2020 08:02:13 -0700 Matthew Wilcox > > wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > > > Filesystems which implement the upcoming ->readahead met

Re: [f2fs-dev] [PATCH] fsck.f2fs: quick fix of CLOCK_BOOTTIME in mac

2020-04-14 Thread Chao Yu
On 2020/4/14 0:19, Jaegeuk Kim wrote: > This fixes build error on mac. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo

Re: [f2fs-dev] [PATCH] f2fs: add tracepoint for f2fs iostat

2020-04-14 Thread Chao Yu
On 2020/4/14 0:16, Jaegeuk Kim wrote: > From: Daeho Jeong > > Added a tracepoint to see iostat of f2fs. Default period of that > is 3 second. This tracepoint can be used to be monitoring > I/O statistics periodically. > > Bug: 152162885 > Change-Id: I6fbe010b9cf1a90caa0f4793a6dab77c4cba7da6 It

Re: [f2fs-dev] [PATCH v4] f2fs: fix long latency due to discard during umount

2020-04-14 Thread Chao Yu
On 2020/4/15 11:31, Sahitya Tummala wrote: > F2FS already has a default timeout of 5 secs for discards that > can be issued during umount, but it can take more than the 5 sec > timeout if the underlying UFS device queue is already full and there > are no more available free tags to be used. Fix thi

Re: [f2fs-dev] [PATCH] f2fs: report the discard cmd errors properly

2020-04-14 Thread Chao Yu
On 2020/4/15 12:05, Sahitya Tummala wrote: > In case a discard_cmd is split into several bios, the dc->error > must not be overwritten once an error is reported by a bio. Also, > move it under dc->lock. > > Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Thanks, _

Re: [f2fs-dev] [PATCH 1/1] mkfs.f2fs: update manual and help message

2020-04-14 Thread Chao Yu
Hi Érico, On 2020/4/13 5:34, Érico Nogueira wrote: > Add options that were missing from the mkfs.f2fs man page, and explain > them more thoroughly when possible. Special care was given to document > all the features that can be enabled during the creation of the > filesystem. Thanks for your good