Commit a344b9fd authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: disable roll-forward when active_logs = 2



The roll-forward mechanism should be activated when the number of active
logs is not 2.
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent d5053a34
...@@ -132,6 +132,8 @@ static inline bool need_do_checkpoint(struct inode *inode) ...@@ -132,6 +132,8 @@ static inline bool need_do_checkpoint(struct inode *inode)
need_cp = true; need_cp = true;
else if (test_opt(sbi, FASTBOOT)) else if (test_opt(sbi, FASTBOOT))
need_cp = true; need_cp = true;
else if (sbi->active_logs == 2)
need_cp = true;
return need_cp; return need_cp;
} }
......
...@@ -1090,8 +1090,8 @@ static int __get_segment_type_4(struct page *page, enum page_type p_type) ...@@ -1090,8 +1090,8 @@ static int __get_segment_type_4(struct page *page, enum page_type p_type)
else else
return CURSEG_COLD_DATA; return CURSEG_COLD_DATA;
} else { } else {
if (IS_DNODE(page) && !is_cold_node(page)) if (IS_DNODE(page) && is_cold_node(page))
return CURSEG_HOT_NODE; return CURSEG_WARM_NODE;
else else
return CURSEG_COLD_NODE; return CURSEG_COLD_NODE;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment