Re: [f2fs-dev] [PATCH 1/2] workqueue: add io priority to work_struct

2024-06-25 Thread kernel test robot
Hi Yi, kernel test robot noticed the following build errors: [auto build test ERROR on tj-wq/for-next] [also build test ERROR on jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev linus/master v6.10-rc5 next-20240625] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [f2fs-dev] [PATCH 1/2] workqueue: add io priority to work_struct

2024-06-25 Thread kernel test robot
Hi Yi, kernel test robot noticed the following build errors: [auto build test ERROR on tj-wq/for-next] [also build test ERROR on jaegeuk-f2fs/dev-test jaegeuk-f2fs/dev linus/master v6.10-rc5 next-20240625] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [f2fs-dev] [PATCH v2] f2fs: fix to avoid racing in between read and OPU dio write

2024-06-25 Thread Zhiguo Niu
Chao Yu 于2024年6月25日周二 22:29写道: > > If lfs mode is on, buffered read may race w/ OPU dio write as below, > it may cause buffered read hits unwritten data unexpectly, and for > dio read, the race condition exists as well. > > Thread AThread B > - f2fs_file_write_iter > -

Re: [f2fs-dev] 答复: [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Zhiguo Niu
Chao Yu 于2024年6月26日周三 09:36写道: > > On 2024/6/25 19:07, Zhiguo Niu wrote: > > Chao Yu 于2024年6月25日周二 18:38写道: > >> > >> On 2024/6/25 16:09, 牛志国 (Zhiguo Niu) wrote: > >>> > >>> > >>> -邮件原件- > >>> 发件人: Chao Yu > >>> 发送时间: 2024年6月25日 14:55 > >>> 收件人: jaeg...@kernel.org > >>> 抄送:

[f2fs-dev] [PATCH v5] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Chao Yu
We may trigger high frequent checkpoint for below case: 1. mkdir /mnt/dir1; set dir1 encrypted 2. touch /mnt/file1; fsync /mnt/file1 3. mkdir /mnt/dir2; set dir2 encrypted 4. touch /mnt/file2; fsync /mnt/file2 ... Although, newly created dir and file are not related, due to commit bbf156f7afa7

Re: [f2fs-dev] 答复: [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Chao Yu
On 2024/6/25 19:07, Zhiguo Niu wrote: Chao Yu 于2024年6月25日周二 18:38写道: On 2024/6/25 16:09, 牛志国 (Zhiguo Niu) wrote: -邮件原件- 发件人: Chao Yu 发送时间: 2024年6月25日 14:55 收件人: jaeg...@kernel.org 抄送: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org; Chao Yu ; wangzijie ; 牛志国

[f2fs-dev] [PATCH v2] f2fs: fix to avoid racing in between read and OPU dio write

2024-06-25 Thread Chao Yu
If lfs mode is on, buffered read may race w/ OPU dio write as below, it may cause buffered read hits unwritten data unexpectly, and for dio read, the race condition exists as well. Thread AThread B - f2fs_file_write_iter - f2fs_dio_write_iter - __iomap_dio_rw -

Re: [f2fs-dev] [PATCH v2] f2fs: only fragment segment in the same section

2024-06-25 Thread Chao Yu
On 2024/6/25 20:15, Sheng Yong wrote: When new_curseg() is allocating a new segment, if mode=fragment:xxx is switched on in large section scenario, __get_next_segno() will select the next segno randomly in the range of [0, maxsegno] in order to fragment segments. If the candidate segno is free,

[f2fs-dev] [PATCH] f2fs: test for race condition in between atomic_write and dio

2024-06-25 Thread Chao Yu
In this patch, we simulate race case in between sqlite atomic write and direct IO w/ below steps: 1. create a regular file, and initialize it w/ 0xff data 2. start transaction (via F2FS_IOC_START_ATOMIC_WRITE) on it 3. write transaction data 4. trigger direct read/write IO on it to check whether

[f2fs-dev] [PATCH v2] f2fs: only fragment segment in the same section

2024-06-25 Thread Sheng Yong via Linux-f2fs-devel
When new_curseg() is allocating a new segment, if mode=fragment:xxx is switched on in large section scenario, __get_next_segno() will select the next segno randomly in the range of [0, maxsegno] in order to fragment segments. If the candidate segno is free, get_new_segment() will use it directly

Re: [f2fs-dev] 答复: [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Zhiguo Niu
Chao Yu 于2024年6月25日周二 18:38写道: > > On 2024/6/25 16:09, 牛志国 (Zhiguo Niu) wrote: > > > > > > -邮件原件- > > 发件人: Chao Yu > > 发送时间: 2024年6月25日 14:55 > > 收件人: jaeg...@kernel.org > > 抄送: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org; > > Chao Yu ; wangzijie ; 牛志国 (Zhiguo

Re: [f2fs-dev] 答复: [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Chao Yu
On 2024/6/25 16:09, 牛志国 (Zhiguo Niu) wrote: -邮件原件- 发件人: Chao Yu 发送时间: 2024年6月25日 14:55 收件人: jaeg...@kernel.org 抄送: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org; Chao Yu ; wangzijie ; 牛志国 (Zhiguo Niu) ; Yunlei He 主题: [PATCH v4] f2fs: reduce expensive

[f2fs-dev] 答复: [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Zhiguo Niu
-邮件原件- 发件人: Chao Yu 发送时间: 2024年6月25日 14:55 收件人: jaeg...@kernel.org 抄送: linux-f2fs-devel@lists.sourceforge.net; linux-ker...@vger.kernel.org; Chao Yu ; wangzijie ; 牛志国 (Zhiguo Niu) ; Yunlei He 主题: [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency 注意:

[f2fs-dev] [PATCH] f2fs: only fragment segment in the same section

2024-06-25 Thread Sheng Yong via Linux-f2fs-devel
If mode=fragment:xxx is enabled in large section mode, segno returned by __get_next_segno() may located in new section with different type, which messes up ssa type. This could be reproduced by the following steps: dd if=/dev/zero of=test.img bs=1M count=10240 mkfs.f2fs -s 128 test.img

Re: [f2fs-dev] [PATCH v3] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread wangzijie
>On 2024/6/25 10:14, wangzijie wrote: >>> We may trigger high frequent checkpoint for below case: >>> 1. mkdir /mnt/dir1; set dir1 encrypted >>> 2. touch /mnt/file1; fsync /mnt/file1 >>> 3. mkdir /mnt/dir2; set dir2 encrypted >>> 4. touch /mnt/file2; fsync /mnt/file2 >>> ... >>> >>> Although,

[f2fs-dev] [PATCH v4] f2fs: reduce expensive checkpoint trigger frequency

2024-06-25 Thread Chao Yu
We may trigger high frequent checkpoint for below case: 1. mkdir /mnt/dir1; set dir1 encrypted 2. touch /mnt/file1; fsync /mnt/file1 3. mkdir /mnt/dir2; set dir2 encrypted 4. touch /mnt/file2; fsync /mnt/file2 ... Although, newly created dir and file are not related, due to commit bbf156f7afa7