Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1536362
| From | Jaegeuk Kim <jaegeuk@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] f2fs: call sync_fs when f2fs is idle |
| Date | 2016-12-05 20:50 +0100 |
| Message-ID | <sL7qV-hs-13@gated-at.bofh.it> (permalink) |
| References | <sL7qV-hs-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index d5141a06b9a3..8affc5621181 100644
--- 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;
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/2] Revert "f2fs: use percpu_counter for # of dirty pages in inode" Jaegeuk Kim <jaegeuk@kernel.org> - 2016-12-05 20:50 +0100 [PATCH 2/2] f2fs: call sync_fs when f2fs is idle Jaegeuk Kim <jaegeuk@kernel.org> - 2016-12-05 20:50 +0100
csiph-web