projects/linux·commit 900f7362

f2fs: avoid to flush nat journal entries

900f7362 · Jaegeuk Kim <[email protected]> · 2017-02-27 21:28:53 -08:00

This patch adds a missing condition which flushes nat journal entries
unnecessarily introduced by:

    f2fs: add bitmaps for empty or full NAT blocks

Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Commit
900f736251c81886f3064c9d489c85eddee921b7
Parents
8b107f5b

Changes

1 files changed · +1 −1

FileStatusAddDelContent
fs/f2fs/node.cmodified+1−1View file

fs/f2fs/node.c

View file
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index b3aead4..9496717 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2513,7 +2513,7 @@ void flush_nat_entries(struct f2fs_sb_info *sbi, struct cp_control *cpc)
* entries, remove all entries from journal and merge them
* into nat entry set.
*/
- if (cpc->reason == CP_UMOUNT ||
+ if (enabled_nat_bits(sbi, cpc) ||
!__has_cursum_space(journal, nm_i->dirty_nat_cnt, NAT_JOURNAL))
remove_nats_in_journal(sbi);