|
@@ -509,7 +509,8 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
|
|
|
else
|
|
|
f2fs_build_free_nids(sbi, false, false);
|
|
|
|
|
|
- if (!is_idle(sbi) && !excess_dirty_nats(sbi))
|
|
|
+ if (!is_idle(sbi) &&
|
|
|
+ (!excess_dirty_nats(sbi) && !excess_dirty_nodes(sbi)))
|
|
|
return;
|
|
|
|
|
|
/* checkpoint is the only way to shrink partial cached entries */
|
|
@@ -517,6 +518,7 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
|
|
|
!f2fs_available_free_memory(sbi, INO_ENTRIES) ||
|
|
|
excess_prefree_segs(sbi) ||
|
|
|
excess_dirty_nats(sbi) ||
|
|
|
+ excess_dirty_nodes(sbi) ||
|
|
|
f2fs_time_over(sbi, CP_TIME)) {
|
|
|
if (test_opt(sbi, DATA_FLUSH)) {
|
|
|
struct blk_plug plug;
|