f2fs: flush dirty nat entries when exceeding threshold
[deliverable/linux.git] / fs / f2fs / segment.c
index e16235bbdd7df002eb74a2f90fd0135989f5286a..53baf4a420dcea7b4d0a006c1fbbb5ee85f546c6 100644 (file)
@@ -291,8 +291,9 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
 
        /* checkpoint is the only way to shrink partial cached entries */
        if (!available_free_memory(sbi, NAT_ENTRIES) ||
-                       excess_prefree_segs(sbi) ||
                        !available_free_memory(sbi, INO_ENTRIES) ||
+                       excess_prefree_segs(sbi) ||
+                       excess_dirty_nats(sbi) ||
                        (is_idle(sbi) && f2fs_time_over(sbi, CP_TIME))) {
                if (test_opt(sbi, DATA_FLUSH))
                        sync_dirty_inodes(sbi, FILE_INODE);
This page took 0.031714 seconds and 5 git commands to generate.