projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
204706c
)
f2fs: call sync_fs when f2fs is idle
author
Jaegeuk Kim
<jaegeuk@kernel.org>
Mon, 5 Dec 2016 19:37:14 +0000
(11:37 -0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Mon, 5 Dec 2016 19:44:07 +0000
(11:44 -0800)
The sync_fs in f2fs_balance_fs_bg must avoid interrupting current user requests.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/segment.c
b/fs/f2fs/segment.c
index d5141a06b9a3dadce74204d8a3bf847d791ae56a..8affc56211814aaadf6639afb67cf126d6cebf85 100644
(file)
--- a/
fs/f2fs/segment.c
+++ b/
fs/f2fs/segment.c
@@
-383,12
+383,15
@@
void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
else
build_free_nids(sbi, false);
+ if (!is_idle(sbi))
+ return;
+
/* checkpoint is the only way to shrink partial cached entries */
if (!available_free_memory(sbi, NAT_ENTRIES) ||
!available_free_memory(sbi, INO_ENTRIES) ||
excess_prefree_segs(sbi) ||
excess_dirty_nats(sbi) ||
-
(is_idle(sbi) && f2fs_time_over(sbi, CP_TIME)
)) {
+
f2fs_time_over(sbi, CP_TIME
)) {
if (test_opt(sbi, DATA_FLUSH)) {
struct blk_plug plug;