Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > On 2022/10/28 11:22, Jaegeuk Kim wrote: > > On 10/28, Chao Yu wrote: > > > On 2022/10/25 14:50, Yangtao Li wrote: > > > > Added a new sysfs node called gc_urgent_idle_remaining. > > > > The user can set the trial count limit for GC urgent and > > > > idle mode with this

Re: [f2fs-dev] [syzbot] BUG: unable to handle kernel NULL pointer dereference in f2fs_stop_discard_thread

2022-10-27 Thread Chao Yu
Hello, Thanks for the report, the bug has been fixed w/ below patch: https://lore.kernel.org/linux-f2fs-devel/20221021023422.3101585-1-c...@kernel.org/T/#u On 2022/10/28 11:34, syzbot wrote: syzbot has bisected this issue to: commit 4d67490498acb4ffcef5ba7bc44990d46e66a44c Author: Fengnan

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Chao Yu
On 2022/10/28 11:22, Jaegeuk Kim wrote: On 10/28, Chao Yu wrote: On 2022/10/25 14:50, Yangtao Li wrote: Added a new sysfs node called gc_urgent_idle_remaining. The user can set the trial count limit for GC urgent and idle mode with this value. If GC thread gets to the limit, the mode will turn

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Chao Yu
On 2022/10/28 11:17, Jaegeuk Kim wrote: On 10/28, Chao Yu wrote: On 2022/10/28 10:33, Yangtao Li wrote: It won't pollute global namespace since it's a static function just be used in f2fs/super.c... emm, I think it would be nice to see the f2fs_record_error_work symbol in the stack, it can

Re: [f2fs-dev] [syzbot] BUG: unable to handle kernel NULL pointer dereference in f2fs_stop_discard_thread

2022-10-27 Thread syzbot
syzbot has bisected this issue to: commit 4d67490498acb4ffcef5ba7bc44990d46e66a44c Author: Fengnan Chang Date: Thu Aug 19 08:02:37 2021 + f2fs: Don't create discard thread when device doesn't support realtime discard bisection log:

Re: [f2fs-dev] [PATCH] f2fs: fix possible memory leak in f2fs_init_sysfs()

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > Jaegeuk, > > There is a generic fix [1], let's drop this one... Ok, thanks. > > https://lore.kernel.org/lkml/20221025071549.1280528-1-yangyingli...@huawei.com/T/ > > On 2022/10/20 16:45, Chao Yu wrote: > > On 2022/10/18 15:32, Yang Yingliang wrote: > > > Inject

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > On 2022/10/25 14:50, Yangtao Li wrote: > > Added a new sysfs node called gc_urgent_idle_remaining. > > The user can set the trial count limit for GC urgent and > > idle mode with this value. If GC thread gets to the limit, > > the mode will turn back to GC normal mode

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Jaegeuk Kim
On 10/28, Chao Yu wrote: > On 2022/10/28 10:33, Yangtao Li wrote: > > > It won't pollute global namespace since it's a static function just be > > > used in f2fs/super.c... > > > > emm, I think it would be nice to see the f2fs_record_error_work symbol > > in the stack, it can be explicitly a

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Chao Yu
On 2022/10/28 10:33, Yangtao Li wrote: It won't pollute global namespace since it's a static function just be used in f2fs/super.c... emm, I think it would be nice to see the f2fs_record_error_work symbol in the stack, it can be explicitly a function of f2fs. personal opinion for reference

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Yangtao Li via Linux-f2fs-devel
> It won't pollute global namespace since it's a static function just be used > in f2fs/super.c... emm, I think it would be nice to see the f2fs_record_error_work symbol in the stack, it can be explicitly a function of f2fs. personal opinion for reference only. > Do you mind letting me merge

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: introducr gc_urgent_idle_remaining sysfs node and mark gc_urgent_high_remaining node deprecated

2022-10-27 Thread Chao Yu
On 2022/10/25 14:50, Yangtao Li wrote: Added a new sysfs node called gc_urgent_idle_remaining. The user can set the trial count limit for GC urgent and idle mode with this value. If GC thread gets to the limit, the mode will turn back to GC normal mode finally. This method is not only

Re: [f2fs-dev] [PATCH] f2fs: fix possible memory leak in f2fs_init_sysfs()

2022-10-27 Thread Chao Yu
Jaegeuk, There is a generic fix [1], let's drop this one... https://lore.kernel.org/lkml/20221025071549.1280528-1-yangyingli...@huawei.com/T/ On 2022/10/20 16:45, Chao Yu wrote: On 2022/10/18 15:32, Yang Yingliang wrote: Inject fault while probing module, kset_register() may fail, if it

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

2022-10-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #70 from bogdan.nico...@gmail.com --- Well, if understand correctly, TRIM will still be issued on-demand when segments are cleared. There's also an option background_gc=sync, which I assume will block other I/O operations.

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

2022-10-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #69 from Matteo Croce (rootki...@yahoo.it) --- That's a terrible workaround. Does it impact the SSD wear leveling algoritmh? Can a periodic fstrim mitigate this? -- You may reply to this email to add a comment. You are receiving

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

2022-10-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216050 --- Comment #68 from bogdan.nico...@gmail.com --- The only reasonable solution that works for me in everyday use is to deactivate the background garbage collector entirely. For reference, this can be done using the background_gc=off mount option

[f2fs-dev] [PATCH] f2fs: do not stop threads in irq context

2022-10-27 Thread Jaegeuk Kim
Let's stop threads first to avoid irq context. Signed-off-by: Jaegeuk Kim --- fs/f2fs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index a241e4073f1d..14b4bb0f8ce6 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix return val in f2fs_start_ckpt_thread()

2022-10-27 Thread Jaegeuk Kim
I integrated two patches into single one. I think we don't need Fixes. On 10/27, Chao Yu wrote: > On 2022/10/27 18:24, Yangtao Li wrote: > > Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM; > > > > Fixes line? > > > Signed-off-by: Yangtao Li > > Reviewed-by: Chao Yu > > Thanks,

Re: [f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Chao Yu
On 2022/10/27 20:08, Yangtao Li wrote: When a fatal error occurs in the file system and it is remounted to ro mode, the flush thread needs to be stopped. Fixes: d81ab30e85a5 ("f2fs: support errors=remount-ro|continue|panic mountoption") Do you mind letting me merge these two patches into

Re: [f2fs-dev] [PATCH 1/3] f2fs: rename flush_error_work() to f2fs_record_error_work()

2022-10-27 Thread Chao Yu
On 2022/10/27 20:08, Yangtao Li wrote: Since it is an f2fs module, it is best to prefix function names with f2fs_. At the same time, there is already a flush thread and related functions in the system, rename flush_error_work() to f2fs_record_error_work(). It won't pollute global namespace

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix return val in f2fs_start_ckpt_thread()

2022-10-27 Thread Chao Yu
On 2022/10/27 18:24, Yangtao Li wrote: Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM; Fixes line? Signed-off-by: Yangtao Li Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net

Re: [f2fs-dev] [PATCH 1/2] f2fs: cleanup in f2fs_create_flush_cmd_control() and f2fs_start_gc_thread()

2022-10-27 Thread Chao Yu
On 2022/10/27 18:24, Yangtao Li wrote: Just cleanup for readable, no functional changes. How about doing such cleanup in one patch? Thanks, Signed-off-by: Yangtao Li --- fs/f2fs/gc.c | 14 ++ fs/f2fs/segment.c | 3 +-- 2 files changed, 7 insertions(+), 10

[f2fs-dev] [PATCH 1/3] f2fs: rename flush_error_work() to f2fs_record_error_work()

2022-10-27 Thread Yangtao Li via Linux-f2fs-devel
Since it is an f2fs module, it is best to prefix function names with f2fs_. At the same time, there is already a flush thread and related functions in the system, rename flush_error_work() to f2fs_record_error_work(). Signed-off-by: Yangtao Li --- fs/f2fs/super.c | 4 ++-- 1 file changed, 2

[f2fs-dev] [PATCH 3/3] f2fs: fix to f2fs_handle_critical_error when errors=remount-ro

2022-10-27 Thread Yangtao Li via Linux-f2fs-devel
When a fatal error occurs in the file system and it is remounted to ro mode, the flush thread needs to be stopped. Fixes: d81ab30e85a5 ("f2fs: support errors=remount-ro|continue|panic mountoption") Signed-off-by: Yangtao Li --- fs/f2fs/super.c | 1 + 1 file changed, 1 insertion(+) diff --git

[f2fs-dev] [PATCH 2/3] f2fs: export f2fs_stop_flush_thread() for external use

2022-10-27 Thread Yangtao Li via Linux-f2fs-devel
Need to stop the flush thread running externally, so export it. Signed-off-by: Yangtao Li --- fs/f2fs/f2fs.h| 1 + fs/f2fs/segment.c | 9 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index b467c0ca1118..0d072b029187 100644 ---

[f2fs-dev] [PATCH] f2fs: Fix typo in comments

2022-10-27 Thread Keoseong Park
Change "truncateion" to "truncation". Signed-off-by: Keoseong Park --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 8cd52b0965b1..aafdf5fbb825 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -571,7 +571,7 @@ void

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix the msg data type

2022-10-27 Thread Pavan Kondeti
On Thu, Oct 27, 2022 at 03:47:02PM +0530, Pavan Kondeti wrote: > On Thu, Oct 27, 2022 at 02:42:41PM +0530, Mukesh Ojha wrote: > > Data type of msg in f2fs_write_checkpoint trace should > > be const char * instead of char *. > > > > Signed-off-by: Mukesh Ojha > > --- > >

[f2fs-dev] [PATCH 2/2] f2fs: fix return val in f2fs_start_ckpt_thread()

2022-10-27 Thread Yangtao Li via Linux-f2fs-devel
Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM; Signed-off-by: Yangtao Li --- fs/f2fs/checkpoint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 2a5d9256a6f4..12fd12f2bb97 100644 --- a/fs/f2fs/checkpoint.c +++

[f2fs-dev] [PATCH 1/2] f2fs: cleanup in f2fs_create_flush_cmd_control() and f2fs_start_gc_thread()

2022-10-27 Thread Yangtao Li via Linux-f2fs-devel
Just cleanup for readable, no functional changes. Signed-off-by: Yangtao Li --- fs/f2fs/gc.c | 14 ++ fs/f2fs/segment.c | 3 +-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index 674a905063db..85d16f4106de 100644 ---

Re: [f2fs-dev] [PATCH 2/2] f2fs: fix the msg data type

2022-10-27 Thread Pavan Kondeti
On Thu, Oct 27, 2022 at 02:42:41PM +0530, Mukesh Ojha wrote: > Data type of msg in f2fs_write_checkpoint trace should > be const char * instead of char *. > > Signed-off-by: Mukesh Ojha > --- > include/trace/events/f2fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[f2fs-dev] [PATCH 2/2] f2fs: fix the msg data type

2022-10-27 Thread Mukesh Ojha
Data type of msg in f2fs_write_checkpoint trace should be const char * instead of char *. Signed-off-by: Mukesh Ojha --- include/trace/events/f2fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index

[f2fs-dev] [PATCH v2 1/2] f2fs: fix the assign logic of iocb

2022-10-27 Thread Mukesh Ojha
commit 18ae8d12991b ("f2fs: show more DIO information in tracepoint") introduces iocb field in 'f2fs_direct_IO_enter' trace event And it only assigns the pointer and later it accesses its field in trace print log. Unable to handle kernel paging request at virtual address ffc04cef3d30 Mem