diff options
author | Chao Yu <chao@kernel.org> | 2024-04-26 17:33:48 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-04-29 17:41:17 +0000 |
commit | a320b2f08b3b26fff0a71777f018553fc1e6873e (patch) | |
tree | 3483c9b7dc609570d9cc62be4da2d331a21e5006 /fs/f2fs/data.c | |
parent | ecd69be71aad3b9299b37b3d8cc3f0fb6016286f (diff) |
f2fs: fix to avoid allocating WARM_DATA segment for direct IO
If active_log is not 6, we never use WARM_DATA segment, let's
avoid allocating WARM_DATA segment for direct IO.
Signed-off-by: Yunlei He <heyunlei@oppo.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index bee1e45f76b8..0c516c653f05 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -4179,7 +4179,8 @@ static int f2fs_iomap_begin(struct inode *inode, loff_t offset, loff_t length, map.m_lblk = bytes_to_blks(inode, offset); map.m_len = bytes_to_blks(inode, offset + length - 1) - map.m_lblk + 1; map.m_next_pgofs = &next_pgofs; - map.m_seg_type = f2fs_rw_hint_to_seg_type(inode->i_write_hint); + map.m_seg_type = f2fs_rw_hint_to_seg_type(F2FS_I_SB(inode), + inode->i_write_hint); if (flags & IOMAP_WRITE) map.m_may_create = true; |