Re: [f2fs-dev] f2fs_empty_dir() can be extremely slow on malicious disk images

2022-11-01 Thread Wei Chen
Dear Eric, Thank you for the email and advice. The bug persists in upstream Linux 6.0 4fe89d07dc. [ 222.604894][ T23] INFO: task a.out:6867 blocked for more than 143 seconds. [ 222.606536][ T23] Not tainted 6.0.0 #35 [ 222.606833][ T23] "echo 0 > /proc/sys/kernel/hung_task_timeout_

[f2fs-dev] f2fs_empty_dir() can be extremely slow on malicious disk images

2022-11-01 Thread Eric Biggers
[+f2fs list and maintainers] [changed subject from "INFO: task hung in fscrypt_ioctl_set_policy"] On Mon, Oct 31, 2022 at 10:18:02PM +0800, Wei Chen wrote: > Dear Linux developers, > > Here is the link to the reproducers. > > C reproducer: > https://drive.google.com/file/d/1mduYsYuoOKemH3qkvpDQ

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread Eric Biggers
On Wed, Nov 02, 2022 at 11:43:11AM +0800, fengnan chang wrote: > > > > What is the purpose of using PG_error here? > > > > > > In this version, we set PG_error when compressed failed, so check > > > PG_error here. > > > Maybe we can remove PG_error in later? > > > > > > > Read I/O errors can be de

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread fengnan chang
Eric Biggers 于2022年11月2日周三 11:18写道: > > On Wed, Nov 02, 2022 at 11:06:17AM +0800, fengnan chang wrote: > > > > > > > 2022年11月2日 10:05,Eric Biggers 写道: > > > > > > On Wed, Jun 08, 2022 at 09:48:52PM +0800, Fengnan Chang wrote: > > >> When decompressed failed, f2fs_prepare_compress_overwrite will e

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread Eric Biggers
On Wed, Nov 02, 2022 at 11:06:17AM +0800, fengnan chang wrote: > > > > 2022年11月2日 10:05,Eric Biggers 写道: > > > > On Wed, Jun 08, 2022 at 09:48:52PM +0800, Fengnan Chang wrote: > >> When decompressed failed, f2fs_prepare_compress_overwrite will enter > >> endless loop, may casue hungtask. > >>

Re: [f2fs-dev] [syzbot] INFO: task hung in f2fs_issue_checkpoint

2022-11-01 Thread syzbot
syzbot has found a reproducer for the following issue on: HEAD commit:b229b6ca5abb Merge tag 'perf-tools-fixes-for-v6.1-2022-10-.. git tree: upstream console+strace: https://syzkaller.appspot.com/x/log.txt?x=12e4704688 kernel config: https://syzkaller.appspot.com/x/.config?x=a66c6c6

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread fengnan chang
> 2022年11月2日 10:05,Eric Biggers 写道: > > On Wed, Jun 08, 2022 at 09:48:52PM +0800, Fengnan Chang wrote: >> When decompressed failed, f2fs_prepare_compress_overwrite will enter >> endless loop, may casue hungtask. >> >> [ 14.088665] F2FS-fs (nvme0n1): lz4 decompress failed, ret:-4155 >> [ 14

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread Eric Biggers
On Wed, Jun 08, 2022 at 09:48:52PM +0800, Fengnan Chang wrote: > When decompressed failed, f2fs_prepare_compress_overwrite will enter > endless loop, may casue hungtask. > > [ 14.088665] F2FS-fs (nvme0n1): lz4 decompress failed, ret:-4155 > [ 14.089851] F2FS-fs (nvme0n1): lz4 decompress failed

Re: [f2fs-dev] [PATCH] f2fs: use sysfs_emit instead of sprintf

2022-11-01 Thread Chao Yu
On 2022/10/29 0:58, Jaegeuk Kim wrote: Let's use sysfs_emit. 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/linux-f2fs

Re: [f2fs-dev] [PATCH] f2fs: replace ternary operator with max()

2022-11-01 Thread Chao Yu
On 2022/10/29 22:49, wangkail...@jari.cn wrote: Fix the following coccicheck warning: ./fs/f2fs/segment.c:877:24-25: WARNING opportunity for max() Signed-off-by: KaiLong Wang Reviewed-by: Chao Yu Thanks, ___ Linux-f2fs-devel mailing list Linux-

Re: [f2fs-dev] [PATCH v2] f2fs: stop discard thread if has fsck tag

2022-11-01 Thread Chao Yu
On 2022/10/28 22:37, Yangtao Li wrote: Under the current logic, after the fsck flag is set, the discard thread will still run periodically. So stop the discard thread from running to avoid energy consumption after the fsck flag is set. Fixes: d618477473eb ("f2fs: stop issue discard if something

Re: [f2fs-dev] [PATCH] f2fs: separate IPU policy for fdatasync from F2FS_IPU_FSYNC

2022-11-01 Thread Chao Yu
On 2022/10/21 10:31, qixiaoyu1 wrote: Currently IPU policy for fdatasync is coupled with F2FS_IPU_FSYNC. Fix to apply it to all IPU policy. Xiaoyu, Sorry for the delay. I didn't get the point, can you please explain more about the issue? Thanks, Signed-off-by: qixiaoyu1 --- fs/f2fs/dat

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread Chao Yu
Hi Fengnan, Sorry for the delay. I guess we can merge this patch, but let me check whether there is another solution, since mm guys want to remove PG_error usage to save one bit slot in page.flags. On 2022/11/1 17:41, fengnan chang wrote: friendly ping... fengnan chang 于2022年10月14日周五 16:46写道

Re: [f2fs-dev] [PATCH v2] f2fs: fix hungtask when decompressed fail

2022-11-01 Thread fengnan chang
friendly ping... fengnan chang 于2022年10月14日周五 16:46写道: > > ping, it seems this had been forgotten. > > > 2022年6月8日 21:48,Fengnan Chang 写道: > > > > When decompressed failed, f2fs_prepare_compress_overwrite will enter > > endless loop, may casue hungtask. > > > > [ 14.088665] F2FS-fs (nvme0n1):