[f2fs-dev] [PATCH v4] fsck.f2fs: Detect and fix looped node chain efficiently

2023-05-17 Thread Chunhai Guo via Linux-f2fs-devel
find_fsync_inode() detect the looped node chain by comparing the loop counter with free blocks. While it may take tens of seconds to quit when the free blocks are large enough. We can use Floyd's cycle detection algorithm to make the detection more efficient, and fix the issue by filling a NULL add

Re: [f2fs-dev] [PATCH] f2fs: maintain six open zones for zoned devices

2023-05-17 Thread Chao Yu
On 2023/5/18 9:21, Jaegeuk Kim wrote: Applied the below comments. Thanks. Reviewed-by: Chao Yu Thanks, On 05/17, Chao Yu wrote: On 2023/5/5 23:50, Jaegeuk Kim wrote: From: Daeho Jeong To keep six open zone constraints, make them not to be open over six open zones. Signed-off-by: Daeho

[f2fs-dev] [PATCH v3] f2fs: flush error flags in workqueue

2023-05-17 Thread Chao Yu
In IRQ context, it wakes up workqueue to record errors into on-disk superblock fields rather than in-memory fields. Fixes: 1aa161e43106 ("f2fs: fix scheduling while atomic in decompression path") Fixes: 95fa90c9e5a7 ("f2fs: support recording errors into superblock") Signed-off-by: Chao Yu --- v3:

Re: [f2fs-dev] (2) (2) [PATCH v6] f2fs: add async reset zone command support

2023-05-17 Thread Daejun Park
> On 05/11, Daejun Park wrote: > > > Sender : Jaegeuk Kim  > > > Date : 2023-05-10 03:53 (GMT+9) > > > Title : Re: [PATCH v6] f2fs: add async reset zone command support > > > To : 박대준 > > > CC : c...@kernel.org, > > > rost...@goodmis.org, > > > mhira...@kernel.org, > > > linux-f2fs-devel@lists.s

Re: [f2fs-dev] [PATCH 3/4] mkfs.f2fs: cleanup w/ alloc_next_free_block()

2023-05-17 Thread Chao Yu
On 2023/5/18 9:36, Jaegeuk Kim wrote: On 05/17, Chao Yu wrote: Introduce alloc_next_free_block() to wrap below openned codes: blkaddr = get_sb(main_blkaddr) + c.cur_seg[curseg_type] * c.blks_per_seg + c.curseg_offset[curseg_type]; Meanwhi

Re: [f2fs-dev] [PATCH v1] f2fs: Fix over-estimating free section during FG GC

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 12 May 2023 13:16:10 +0900 you wrote: > There was a bug that finishing FG GC unconditionally because free sections > are over-estimated after checkpoint in FG GC. > This patch initializes sec_freed by every checkpoin

Re: [f2fs-dev] [PATCH v2] f2fs: compress: fix to check validity of i_compress_flag field

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Wed, 17 May 2023 11:41:39 +0800 you wrote: > The last valid compress related field is i_compress_flag, check its > validity instead of i_log_cluster_size. > > Signed-off-by: Chao Yu > --- > v2: > - rebase the code. > f

Re: [f2fs-dev] [PATCH] f2fs: fix potential deadlock due to unpaired node_write lock use

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sun, 14 May 2023 16:07:23 +0800 you wrote: > If S_NOQUOTA is cleared from inode during data page writeback of quota > file, it may miss to unlock node_write lock, result in potential > deadlock, fix to use the lock in pai

Re: [f2fs-dev] [PATCH] f2fs: fix the wrong condition to determine atomic context

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 5 May 2023 12:18:41 -0700 you wrote: > Should use !in_task for irq context. > > Fixes: 1aa161e43106 ("f2fs: fix scheduling while atomic in decompression > path") > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/comp

Re: [f2fs-dev] [PATCH] f2fs: close unused open zones while mounting

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Fri, 5 May 2023 13:40:00 -0700 you wrote: > From: Daeho Jeong > > Zoned UFS allows only 6 open zones at the same time, so we need to take > care of the count of open zones while mounting. > > Signed-off-by: Daeho Jeon

Re: [f2fs-dev] [PATCH v3] f2fs: add sanity compress level check for compressed file

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Sat, 8 Apr 2023 02:31:47 +0800 you wrote: > Commit 3fde13f817e2 ("f2fs: compress: support compress level") > forgot to do basic compress level check, let's add it. > > Signed-off-by: Yangtao Li > --- > fs/f2fs/inode.c

Re: [f2fs-dev] [PATCH] f2fs: fix to set noatime and immutable flag for quota file

2023-05-17 Thread patchwork-bot+f2fs
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Tue, 16 May 2023 23:23:46 +0800 you wrote: > We should set noatime bit for quota files, since no one cares about > atime of quota file, and we should set immutalbe bit as well, due to > nobody should write to the file thr

Re: [f2fs-dev] [PATCH 1/2] f2fs: renew value of F2FS_MOUNT_*

2023-05-17 Thread patchwork-bot+f2fs
Hello: This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim : On Wed, 17 May 2023 17:42:49 +0800 you wrote: > Then we can just define newly introduced mount option w/ lasted > free number rather than random free one. > > Just cleanup, no logic changes. > > Signed-off-by: Chao Yu >

[f2fs-dev] Patchwork summary for: f2fs

2023-05-17 Thread patchwork-bot+f2fs
Hello: The following patches were marked "accepted", because they were applied to jaegeuk/f2fs.git (dev): Series: [f2fs-dev,1/2] f2fs: renew value of F2FS_MOUNT_* Submitter: Chao Yu Committer: Jaegeuk Kim Patchwork: https://patchwork.kernel.org/project/f2fs/list/?series=748349 Lore link

Re: [f2fs-dev] [PATCH v2] f2fs: flush error flags in workqueue

2023-05-17 Thread Jaegeuk Kim
On 05/16, Chao Yu wrote: > In IRQ context, it wakes up workqueue to record errors into on-disk > superblock fields rather than in-memory fields. > Fixes:? > Signed-off-by: Chao Yu > --- > v2: > - make f2fs_record_errors() static. > fs/f2fs/compress.c | 2 +- > fs/f2fs/f2fs.h | 1 + > fs/

Re: [f2fs-dev] [PATCH 3/4] mkfs.f2fs: cleanup w/ alloc_next_free_block()

2023-05-17 Thread Jaegeuk Kim
On 05/17, Chao Yu wrote: > Introduce alloc_next_free_block() to wrap below openned codes: > > blkaddr = get_sb(main_blkaddr) + > c.cur_seg[curseg_type] * c.blks_per_seg + > c.curseg_offset[curseg_type]; > > Meanwhile add curseg_offset field in f2f

Re: [f2fs-dev] [PATCH] f2fs: maintain six open zones for zoned devices

2023-05-17 Thread Jaegeuk Kim
Applied the below comments. Thanks. On 05/17, Chao Yu wrote: > On 2023/5/5 23:50, Jaegeuk Kim wrote: > > From: Daeho Jeong > > > > To keep six open zone constraints, make them not to be open over six > > open zones. > > > > Signed-off-by: Daeho Jeong > > Signed-off-by: Jaegeuk Kim > > --- > >

Re: [f2fs-dev] Kernel warnings 6.3.1

2023-05-17 Thread Jaegeuk Kim
Hi, Could you please consider v6.3.3 which has some fixes? Thanks, On 05/12, Richard Tresidder via Linux-f2fs-devel wrote: > Hi >    We're upgrading our systems from using a 5.1.7 based kernel to a 6.3.1 > based kernel. > I'm experiencing some warnings popping out occasionally from the f2fs driv

Re: [f2fs-dev] (2) [PATCH v6] f2fs: add async reset zone command support

2023-05-17 Thread Jaegeuk Kim
On 05/11, Daejun Park wrote: > > Sender : Jaegeuk Kim  > > Date : 2023-05-10 03:53 (GMT+9) > > Title : Re: [PATCH v6] f2fs: add async reset zone command support > > To : 박대준 > > CC : c...@kernel.org, > > rost...@goodmis.org, > > mhira...@kernel.org, > > linux-f2fs-devel@lists.sourceforge.net, >

Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event

2023-05-17 Thread Jaegeuk Kim
On 05/17, Wu Bo wrote: > On 2023/5/17 16:36, Chao Yu wrote: > > On 2023/5/17 11:59, Wu Bo wrote: > > > On 2023/5/17 10:44, Chao Yu wrote: > > > > On 2023/5/16 20:07, Wu Bo wrote: > > > > > Modify the order between 'trace_f2fs_iget' & > > > > > 'unlock_new_inode', so the > > > > > I_NEW can pass to

Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event

2023-05-17 Thread Wu Bo
On 2023/5/17 16:36, Chao Yu wrote: On 2023/5/17 11:59, Wu Bo wrote: On 2023/5/17 10:44, Chao Yu wrote: On 2023/5/16 20:07, Wu Bo wrote: Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so the I_NEW can pass to the trace event when the inode initialised. Why is it needed? And

Re: [f2fs-dev] [PATCH v3] fsck.f2fs: Detect and fix looped node chain efficiently

2023-05-17 Thread Chao Yu
On 2023/5/17 20:46, Chunhai Guo wrote: find_fsync_inode() detect the looped node chain by comparing the loop counter with free blocks. While it may take tens of seconds to quit when the free blocks are large enough. We can use Floyd's cycle detection algorithm to make the detection more efficient

[f2fs-dev] [PATCH v3] fsck.f2fs: Detect and fix looped node chain efficiently

2023-05-17 Thread Chunhai Guo via Linux-f2fs-devel
find_fsync_inode() detect the looped node chain by comparing the loop counter with free blocks. While it may take tens of seconds to quit when the free blocks are large enough. We can use Floyd's cycle detection algorithm to make the detection more efficient, and fix the issue in the last node of t

[f2fs-dev] [PATCH 2/2] f2fs: renew value of F2FS_FEATURE_*

2023-05-17 Thread Chao Yu
Define F2FS_FEATURE_* macro w/ 32-bits value rather than 16-bits value. No logic changes. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index 6719cf1c5596..8d4eaf4d22

[f2fs-dev] [PATCH 1/2] f2fs: renew value of F2FS_MOUNT_*

2023-05-17 Thread Chao Yu
Then we can just define newly introduced mount option w/ lasted free number rather than random free one. Just cleanup, no logic changes. Signed-off-by: Chao Yu --- fs/f2fs/f2fs.h | 56 +- 1 file changed, 28 insertions(+), 28 deletions(-) diff --g

Re: [f2fs-dev] [PATCH 1/1] f2fs: pass I_NEW flag to trace event

2023-05-17 Thread Chao Yu
On 2023/5/17 11:59, Wu Bo wrote: On 2023/5/17 10:44, Chao Yu wrote: On 2023/5/16 20:07, Wu Bo wrote: Modify the order between 'trace_f2fs_iget' & 'unlock_new_inode', so the I_NEW can pass to the trace event when the inode initialised. Why is it needed? And trace_f2fs_iget() won't print inode-

[f2fs-dev] [PATCH 4/4] mkfs.f2fs: refactor format flow for cleanup

2023-05-17 Thread Chao Yu
During formatting device, node/data block and filesystem metatdata related to same inode were updated in separated functions, e.g. for root inode: - f2fs_write_root_inode() updates root inode's block - f2fs_write_check_point_pack updates its nat/sit journal, summary block Result in: - there are so

[f2fs-dev] [PATCH 3/4] mkfs.f2fs: cleanup w/ alloc_next_free_block()

2023-05-17 Thread Chao Yu
Introduce alloc_next_free_block() to wrap below openned codes: blkaddr = get_sb(main_blkaddr) + c.cur_seg[curseg_type] * c.blks_per_seg + c.curseg_offset[curseg_type]; Meanwhile add curseg_offset field in f2fs_configuration to record last bl

[f2fs-dev] [PATCH 1/4] f2fs-tools: add noatime for quota file

2023-05-17 Thread Chao Yu
Disk quota file is controlled by filesystem quota subsystem, access time of quota file is almost random, and should be meanless to user, so let's add noatime to quota file. Meanwhile, set quota file w/ F2FS_IMMUTABLE_FL instead of FS_IMMUTABLE_FL, since F2FS_IMMUTABLE_FL is on-disk flag, however F

[f2fs-dev] [PATCH 2/4] mkfs.f2fs: remove unneeded nat initialization in f2fs_update_nat_root()

2023-05-17 Thread Chao Yu
- remove unneeded nat initialization for root/quota inode due to it has been initialized in nat journal. - name f2fs_update_nat_root() to f2fs_update_nat_default(). Signed-off-by: Chao Yu --- mkfs/f2fs_format.c | 24 ++-- 1 file changed, 2 insertions(+), 22 deletions(-) diff