Message ID | 1705478398-10890-1-git-send-email-zhiguo.niu@unisoc.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 5e9f083a7ae81058ceffd91e00c6fea3e7078dce |
Headers | show |
Series | [f2fs-dev] f2fs: use IS_INODE replace IS_DNODE in f2fs_flush_inline_data | expand |
On 2024/1/17 15:59, Zhiguo Niu wrote: > Now IS_DNODE is used in f2fs_flush_inline_data and it has some problems: > 1. Just only inodes may include inline data,not all direct nodes > 2. When system IO is busy, it is inefficient to lock a direct node page > but not an inode page. Besides, if this direct node page is being > locked by others for IO, f2fs_flush_inline_data will be blocked here, > which will affects the checkpoint process, this is unreasonable. > > So IS_INODE should be used in f2fs_flush_inline_data. > > Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Thanks,
Hello: This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <jaegeuk@kernel.org>: On Wed, 17 Jan 2024 15:59:58 +0800 you wrote: > Now IS_DNODE is used in f2fs_flush_inline_data and it has some problems: > 1. Just only inodes may include inline data,not all direct nodes > 2. When system IO is busy, it is inefficient to lock a direct node page > but not an inode page. Besides, if this direct node page is being > locked by others for IO, f2fs_flush_inline_data will be blocked here, > which will affects the checkpoint process, this is unreasonable. > > [...] Here is the summary with links: - [f2fs-dev] f2fs: use IS_INODE replace IS_DNODE in f2fs_flush_inline_data https://git.kernel.org/jaegeuk/f2fs/c/5e9f083a7ae8 You are awesome, thank you!
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 541c4ad..a8fe49a3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1919,7 +1919,7 @@ void f2fs_flush_inline_data(struct f2fs_sb_info *sbi) for (i = 0; i < nr_folios; i++) { struct page *page = &fbatch.folios[i]->page; - if (!IS_DNODE(page)) + if (!IS_INODE(page)) continue; lock_page(page);
Now IS_DNODE is used in f2fs_flush_inline_data and it has some problems: 1. Just only inodes may include inline data,not all direct nodes 2. When system IO is busy, it is inefficient to lock a direct node page but not an inode page. Besides, if this direct node page is being locked by others for IO, f2fs_flush_inline_data will be blocked here, which will affects the checkpoint process, this is unreasonable. So IS_INODE should be used in f2fs_flush_inline_data. Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> --- fs/f2fs/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)