Hi Chao,
>On 2021/9/30 8:59, Keoseong Park wrote:
>> Since active_logs can be set to 2 or 4 or NR_CURSEG_PERSIST_TYPE(6),
>> it cannot be set to NR_CURSEG_TYPE(8).
>> That is, whint_mode is always off.
>>
>> Therefore, the condition is changed from NR_CURSEG_TYPE to
>> NR_CURSEG_PERSIST_TYPE.
>>
> > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> > index c1bf9ad4c220..9b663eaf4805 100644
> > --- a/fs/f2fs/compress.c
> > +++ b/fs/f2fs/compress.c
> > @@ -1530,6 +1530,7 @@ int f2fs_write_multi_pages(struct compress_ctx *cc,
> > if (cluster_may_compress(cc)) {
> > er
This patch may will make random write bench score reduce a lot.
In my test, use fio test randwrite, config as below:
[global]
direct=1
numjobs=1
time_based
runtime=60
ioengine=sync
iodepth=16
filename=fio-test
buffer_pattern=0x00
[file5]
name=fio-rand-write
rw=randwrite
bs=4K
size=128M
w/o pa
when overwrite only first block of cluster, since cluster is not full, it
will call f2fs_write_raw_pages when f2fs_write_multi_pages, and cause the
whole cluster become uncompressed eventhough data can be compressed.
this may will make random write bench score reduce a lot.
root# dd if=/dev/zero o