mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
f2fs: give time to flush dirty pages for checkpoint
If all the threads are waiting for checkpoint, we have no chance to flush required dirty pages. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
9bb02c3627
commit
3097388354
1 changed files with 3 additions and 0 deletions
|
@ -980,6 +980,7 @@ static int block_operations(struct f2fs_sb_info *sbi)
|
||||||
err = sync_dirty_inodes(sbi, DIR_INODE);
|
err = sync_dirty_inodes(sbi, DIR_INODE);
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
cond_resched();
|
||||||
goto retry_flush_dents;
|
goto retry_flush_dents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -995,6 +996,7 @@ static int block_operations(struct f2fs_sb_info *sbi)
|
||||||
err = f2fs_sync_inode_meta(sbi);
|
err = f2fs_sync_inode_meta(sbi);
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
cond_resched();
|
||||||
goto retry_flush_dents;
|
goto retry_flush_dents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1009,6 +1011,7 @@ static int block_operations(struct f2fs_sb_info *sbi)
|
||||||
f2fs_unlock_all(sbi);
|
f2fs_unlock_all(sbi);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
cond_resched();
|
||||||
goto retry_flush_nodes;
|
goto retry_flush_nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue