[f2fs-dev] [Bug 216050] f2fs_gc occupies 100% cpu

2022-11-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #79 from Jaegeuk Kim (jaeg...@kernel.org) --- I just had some time to think of this issue, and suspect there was no time to reschedule the cpu in the loop? Can anyone try this change? diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c

Re: [f2fs-dev] [PATCH] f2fs: remove gc_urgent_high_remaining node

2022-11-10 Thread Jaegeuk Kim
On 11/10, Yangtao Li wrote: > Hi Jaegeuk, > > > Hi, > > > I modified and integrated some patches as below. Could you please take a > > look? > > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev=d34f1e7212c1965a409d4581a32a92a1c91495fc > > I've looked at the

Re: [f2fs-dev] [PATCH v3 11/23] f2fs: Convert f2fs_fsync_node_pages() to use filemap_get_folios_tag()

2022-11-10 Thread Vishal Moola
On Mon, Oct 24, 2022 at 12:31 PM Vishal Moola wrote: > > On Mon, Oct 17, 2022 at 1:25 PM Vishal Moola (Oracle) > wrote: > > > > Convert function to use a folio_batch instead of pagevec. This is in > > preparation for the removal of find_get_pages_range_tag(). > > > > Signed-off-by: Vishal Moola

Re: [f2fs-dev] [PATCH v6 2/2] f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE

2022-11-10 Thread Chao Yu
On 2022/11/1 3:24, Daeho Jeong wrote: From: Daeho Jeong introduce a new ioctl to replace the whole content of a file atomically, which means it induces truncate and content update at the same time. We can start it with F2FS_IOC_START_ATOMIC_REPLACE and complete it with

Re: [f2fs-dev] [PATCH v2] f2fs: support fault injection for flush submission error

2022-11-10 Thread Matthew Wilcox
On Thu, Nov 10, 2022 at 11:25:22AM +0800, Yangtao Li wrote: > Since we now support read, write, and discard in FAULT_INJECT, > let's add support for flush. But _why_? There is a verifiable thing that didn't happen to the data if the read/write/discard fails. If flush fails ... how do you know?

Re: [f2fs-dev] [PATCH V2] f2fs: fix atgc bug on issue in 32bits platform

2022-11-10 Thread Arnd Bergmann
On Thu, Nov 10, 2022, at 11:20, Zhiguo Niu wrote: > Arnd Bergmann 于2022年11月10日周四 17:07写道: >> On Thu, Nov 10, 2022, at 09:33, kernel test robot wrote: >> > base: >> > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git >> > dev-test >> > patch link: >> >

[f2fs-dev] [PATCH 2/4] fsck.f2fs: add parentheses for SB_MASK

2022-11-10 Thread Sheng Yong via Linux-f2fs-devel
Signed-off-by: Sheng Yong --- fsck/fsck.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsck/fsck.h b/fsck/fsck.h index 939450f..dabd8b9 100644 --- a/fsck/fsck.h +++ b/fsck/fsck.h @@ -50,7 +50,7 @@ enum SB_ADDR { SB_MAX_ADDR, }; -#define SB_MASK(i) (1 << i)

[f2fs-dev] [PATCH 3/4] fsck.f2fs: fix potential overflow of copying i_name

2022-11-10 Thread Sheng Yong via Linux-f2fs-devel
If i_namelen is corrupted, there may be an overflow when doing memcpy. Signed-off-by: Sheng Yong --- fsck/fsck.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index 036a834..ebc60ad 100644 --- a/fsck/fsck.c +++ b/fsck/fsck.c @@ -742,8

[f2fs-dev] [PATCH 1/4] dump.f2fs: remove unavailable optiont -g

2022-11-10 Thread Sheng Yong via Linux-f2fs-devel
Option "-g" for dump.f2fs is unavailable and not used in dump.f2fs. Signed-off-by: Sheng Yong --- fsck/main.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/fsck/main.c b/fsck/main.c index 3268664..9b50787 100644 --- a/fsck/main.c +++ b/fsck/main.c @@ -273,8

[f2fs-dev] [PATCH 4/4] fsck.f2fs: avoid uncessary recalculation

2022-11-10 Thread Sheng Yong via Linux-f2fs-devel
There is no need to recalculate ADDRS_PER_INODE and ADDRS_PER_BLOCK, especially in a for loop. Signed-off-by: Sheng Yong --- fsck/fsck.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/fsck/fsck.c b/fsck/fsck.c index ebc60ad..ec096f2 100644 ---

Re: [f2fs-dev] [PATCH v6 1/2] f2fs: correct i_size change for atomic writes

2022-11-10 Thread Chao Yu
On 2022/11/1 3:24, Daeho Jeong wrote: From: Daeho Jeong We need to make sure i_size doesn't change until atomic write commit is successful and restore it when commit is failed. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Thanks, ___

Re: [f2fs-dev] [PATCH v2] f2fs: allow to read node block after shutdown

2022-11-10 Thread Chao Yu
On 2022/11/9 10:11, Jaegeuk Kim wrote: If block address is still alive, we should give a valid node block even after shutdown. Otherwise, we can see zero data when reading out a file. Cc: sta...@vger.kernel.org Fixes: 83a3bfdb5a8 ("f2fs: indicate shutdown f2fs to allow unmount successfully")

Re: [f2fs-dev] [PATCH] f2fs: initialize locks earlier in f2fs_fill_super()

2022-11-10 Thread Chao Yu
On 2022/11/9 6:04, Tetsuo Handa wrote: syzbot is reporting lockdep warning at f2fs_handle_error() [1], for spin_lock(>error_lock) is called before spin_lock_init() is called. For safe locking in error handling, move initialization of locks (and obvious structures) in f2fs_fill_super() to

[f2fs-dev] [PATCH v2] f2fs: fix to set flush_merge opt and show noflush_merge

2022-11-10 Thread Yangtao Li via Linux-f2fs-devel
Some minor modifications to flush_merge and related parameters: 1.The FLUSH_MERGE opt is set by default only in non-ro mode. 2.When ro and merge are set at the same time, an error is reported. 3.Display noflush_merge mount opt. Suggested-by: Chao Yu Signed-off-by: Yangtao Li ---

Re: [f2fs-dev] [PATCH V2] f2fs: fix atgc bug on issue in 32bits platform

2022-11-10 Thread Arnd Bergmann
On Thu, Nov 10, 2022, at 09:33, kernel test robot wrote: > Hi zhiguo.niu", > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on jaegeuk-f2fs/dev-test] > [also build test WARNING on linus/master v6.1-rc4 next-20221109] > [If your patch is applied to the wrong

Re: [f2fs-dev] [PATCH v2] f2fs: support fault injection for flush submission error

2022-11-10 Thread Bagas Sanjaya
On 11/10/22 10:25, Yangtao Li wrote: > Since we now support read, write, and discard in FAULT_INJECT, > let's add support for flush. > > This patch supports to inject fault into __submit_flush_wait() to > simulate flush cmd io error. > What about this description instead? ``` Since

Re: [f2fs-dev] [PATCH v3] fsverity: stop using PG_error to track error status

2022-11-10 Thread Eric Biggers
On Fri, Oct 28, 2022 at 10:58:07AM -0700, Eric Biggers wrote: > From: Eric Biggers > > As a step towards freeing the PG_error flag for other uses, change ext4 > and f2fs to stop using PG_error to track verity errors. Instead, if a > verity error occurs, just mark the whole bio as failed. The

Re: [f2fs-dev] [PATCH] f2fs: remove gc_urgent_high_remaining node

2022-11-10 Thread Yangtao Li via Linux-f2fs-devel
Hi Jaegeuk, > Hi, > I modified and integrated some patches as below. Could you please take a look? > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev=d34f1e7212c1965a409d4581a32a92a1c91495fc I've looked at the relevant changes on the branch, looks good to me. One