Re: [f2fs-dev] [PATCH 1/2] f2fs/006: add testcase to check out-of-space case

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
On 2024/10/23 11:17, Zorro Lang wrote: On Wed, Oct 23, 2024 at 10:53:09AM +0800, Chao Yu wrote: On 2024/10/23 10:37, Zorro Lang wrote: On Tue, Oct 15, 2024 at 10:51:05AM +0800, Chao Yu wrote: This is a regression test to check whether f2fs handles dirty data correctly when checkpoint is disabl

Re: [f2fs-dev] [PATCH 1/2] f2fs/006: add testcase to check out-of-space case

2024-10-22 Thread Zorro Lang
On Wed, Oct 23, 2024 at 10:53:09AM +0800, Chao Yu wrote: > On 2024/10/23 10:37, Zorro Lang wrote: > > On Tue, Oct 15, 2024 at 10:51:05AM +0800, Chao Yu wrote: > > > This is a regression test to check whether f2fs handles dirty > > > data correctly when checkpoint is disabled, if lfs mode is on, > >

[f2fs-dev] [PATCH V2] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_LOW or GC_URGENT_MID

2024-10-22 Thread Zhiguo Niu
If gc_mode is set to GC_URGENT_LOW or GC_URGENT_MID, cost benefit GC approach should be used, but if ATGC is enabled at the same time, Age-threshold approach will be selected, which can only do amount of GC and it is much less than the numbers of CB approach. some traces: f2fs_gc-254:48-396

Re: [f2fs-dev] [PATCH 2/2] f2fs/007: add testcase to check consistency of compressed inode metadata

2024-10-22 Thread Zorro Lang
On Tue, Oct 15, 2024 at 10:51:06AM +0800, Chao Yu wrote: > metadata of compressed inode should always be consistent after file > compression, reservation, releasement and decompression, let's add > a testcase to check it. > > Cc: Jaegeuk Kim > Cc: Qi Han > Signed-off-by: Chao Yu > --- > tests/

[f2fs-dev] [PATCH v3] f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable

2024-10-22 Thread Qi Han via Linux-f2fs-devel
When the free segment is used up during CP disable, many write or ioctl operations will get ENOSPC error codes, even if there are still many blocks available. We can reproduce it in the following steps: dd if=/dev/zero of=f2fs.img bs=1M count=65 mkfs.f2fs -f f2fs.img mount f2fs.img f2fs_dir -o che

Re: [f2fs-dev] [PATCH v3] f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
On 2024/10/23 10:59, Qi Han wrote: When the free segment is used up during CP disable, many write or ioctl operations will get ENOSPC error codes, even if there are still many blocks available. We can reproduce it in the following steps: dd if=/dev/zero of=f2fs.img bs=1M count=65 mkfs.f2fs -f f2

Re: [f2fs-dev] [PATCH 1/2] f2fs/006: add testcase to check out-of-space case

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
On 2024/10/23 10:37, Zorro Lang wrote: On Tue, Oct 15, 2024 at 10:51:05AM +0800, Chao Yu wrote: This is a regression test to check whether f2fs handles dirty data correctly when checkpoint is disabled, if lfs mode is on, it will trigger OPU for all overwritten data, this will cost free segments,

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_MID

2024-10-22 Thread Zhiguo Niu
Chao Yu 于2024年10月23日周三 10:42写道: > > On 2024/10/22 17:14, Zhiguo Niu wrote: > > GC_URGENT_MID is introduced by commit > > d98af5f45520 ("f2fs: introduce gc_urgent_mid mode"), aim to does GC > > forcibly uses cost benefit GC approach, but if ATGC is enabled at > > the same time, Age-threshold approa

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_MID

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
On 2024/10/22 17:14, Zhiguo Niu wrote: GC_URGENT_MID is introduced by commit d98af5f45520 ("f2fs: introduce gc_urgent_mid mode"), aim to does GC forcibly uses cost benefit GC approach, but if ATGC is enabled at the same time, Age-threshold approach will be selected, which can only do amount of GC

Re: [f2fs-dev] [PATCH 1/2] f2fs/006: add testcase to check out-of-space case

2024-10-22 Thread Zorro Lang
On Tue, Oct 15, 2024 at 10:51:05AM +0800, Chao Yu wrote: > This is a regression test to check whether f2fs handles dirty > data correctly when checkpoint is disabled, if lfs mode is on, > it will trigger OPU for all overwritten data, this will cost > free segments, so f2fs must account overwritten

Re: [f2fs-dev] [PATCH v2] f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
On 2024/10/22 17:15, Qi Han wrote: When the free segment is used up during CP disable, many write or ioctl operations will get ENOSPC error codes, even if there are still many blocks available. We can reproduce it in the following steps: dd if=/dev/zero of=f2fs.img bs=1M count=65 mkfs.f2fs -f f2

[f2fs-dev] [PATCH] f2fs: fix to avoid use GC_AT when setting gc_mode as GC_URGENT_MID

2024-10-22 Thread Zhiguo Niu
GC_URGENT_MID is introduced by commit d98af5f45520 ("f2fs: introduce gc_urgent_mid mode"), aim to does GC forcibly uses cost benefit GC approach, but if ATGC is enabled at the same time, Age-threshold approach will be selected, which can only do amount of GC and it is much less than the numbers of

[f2fs-dev] [PATCH v2] f2fs: modify f2fs_is_checkpoint_ready logic to allow more data to be written with the CP disable

2024-10-22 Thread Qi Han via Linux-f2fs-devel
When the free segment is used up during CP disable, many write or ioctl operations will get ENOSPC error codes, even if there are still many blocks available. We can reproduce it in the following steps: dd if=/dev/zero of=f2fs.img bs=1M count=65 mkfs.f2fs -f f2fs.img mount f2fs.img f2fs_dir -o che

[f2fs-dev] [PATCH v2] f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason()

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
syzbot reports deadlock issue of f2fs as below: == WARNING: possible circular locking dependency detected 6.12.0-rc3-syzkaller-00087-gc964ced77262 #0 Not tainted -- kswapd0/79 is trying to acqui

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason()

2024-10-22 Thread Chao Yu via Linux-f2fs-devel
On 2024/10/22 16:22, Daejun Park wrote: Hi Chao Yu, - Original Message - Sender : Chao Yu via Linux-f2fs-devel Date : 2024-10-22 15:21 (GMT+9) Title : [f2fs-dev] [PATCH] f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason() syzbot reports deadlock issue of

Re: [f2fs-dev] [PATCH] f2fs: fix to avoid potential deadlock in f2fs_record_stop_reason()

2024-10-22 Thread Daejun Park
Hi Chao Yu, >  >- Original Message - >Sender : Chao Yu via Linux-f2fs-devel >Date : 2024-10-22 15:21 (GMT+9) >Title : [f2fs-dev] [PATCH] f2fs: fix to avoid potential deadlock in >f2fs_record_stop_reason() >  >syzbot reports deadlock issue of f2fs as below: > >===