https://bugzilla.kernel.org/show_bug.cgi?id=216050
--- Comment #29 from Chao Yu (c...@kernel.org) --- >From 8a351359b0834f048dc35b5f53276c14a35e4ff9 Mon Sep 17 00:00:00 2001 From: Chao Yu <c...@kernel.org> Date: Fri, 1 Jul 2022 08:58:50 +0800 Subject: [PATCH] f2fs: add debug log for gc_thread deadloop --- fs/f2fs/data.c | 3 +++ fs/f2fs/gc.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index c448c3ee7ac3..6cb4ebbbae8b 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1303,7 +1303,10 @@ struct page *f2fs_get_lock_data_page(struct inode *inode, pgoff_t index, { struct address_space *mapping = inode->i_mapping; struct page *page; + int i = 0; repeat: + if (++i % 1000 == 0) + printf("f2fs_get_lock_data_page i:%d\n", i); page = f2fs_get_read_data_page(inode, index, 0, for_write); if (IS_ERR(page)) return page; diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index f4aa3c88118b..d252de051810 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -1470,6 +1470,7 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, int phase = 0; int submitted = 0; unsigned int usable_blks_in_seg = f2fs_usable_blks_in_seg(sbi, segno); + int i = 0; start_addr = START_BLOCK(sbi, segno); @@ -1555,6 +1556,9 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum, continue; } + if (++i % 1000 == 0) + printf("gc_data_segment i:%d\n", i); + data_page = f2fs_get_read_data_page(inode, start_bidx, REQ_RAHEAD, true); f2fs_up_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]); -- 2.25.1 -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel