summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2016-07-13 19:33:19 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2016-07-15 15:21:23 -0700
commit9dfa1baff76d08843aaf5e3c78f6da6950957702 (patch)
tree72de844844bf3a78ed02ba11e36b405246bf8a0d /fs/f2fs/segment.c
parent82e0a5aa5ddf794b3e1b21fcd091228736871882 (diff)
downloadblackbird-obmc-linux-9dfa1baff76d08843aaf5e3c78f6da6950957702.tar.gz
blackbird-obmc-linux-9dfa1baff76d08843aaf5e3c78f6da6950957702.zip
f2fs: use blk_plug in all the possible paths
This patch reverts 19a5f5e2ef37 (f2fs: drop any block plugging), and adds blk_plug in write paths additionally. The main reason is that blk_start_plug can be used to wake up from low-power mode before submitting further bios. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index e87aa058f57a..d45e6bbf8493 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -381,8 +381,13 @@ void f2fs_balance_fs_bg(struct f2fs_sb_info *sbi)
excess_prefree_segs(sbi) ||
excess_dirty_nats(sbi) ||
(is_idle(sbi) && f2fs_time_over(sbi, CP_TIME))) {
- if (test_opt(sbi, DATA_FLUSH))
+ if (test_opt(sbi, DATA_FLUSH)) {
+ struct blk_plug plug;
+
+ blk_start_plug(&plug);
sync_dirty_inodes(sbi, FILE_INODE);
+ blk_finish_plug(&plug);
+ }
f2fs_sync_fs(sbi->sb, true);
stat_inc_bg_cp_count(sbi->stat_info);
}
OpenPOWER on IntegriCloud