diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-03-27 18:14:05 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-05-21 18:41:31 +0200 |
| commit | 3ae77a6cb9af785511f8a4bbbfcb76331f3e89d4 (patch) | |
| tree | 0d5e482551954551c41a9d44a232636bd618a798 | |
| parent | b2d1411e78d9e69aec535c5eaf6f2913f0127671 (diff) | |
f2fs: shrink blk plug region
Don't use blk plug covering area where there won't be any IOs being issued.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/segment.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index fddcf067c..98e733886 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -991,9 +991,8 @@ repeat: if (kthread_should_stop()) return 0; - blk_start_plug(&plug); - mutex_lock(&dcc->cmd_lock); + blk_start_plug(&plug); list_for_each_entry_safe(dc, tmp, pend_list, list) { f2fs_bug_on(sbi, dc->state != D_PREP); @@ -1003,6 +1002,7 @@ repeat: if (iter++ > DISCARD_ISSUE_RATE) break; } + blk_finish_plug(&plug); list_for_each_entry_safe(dc, tmp, wait_list, list) { if (dc->state == D_DONE) { @@ -1012,8 +1012,6 @@ repeat: } mutex_unlock(&dcc->cmd_lock); - blk_finish_plug(&plug); - iter = 0; congestion_wait(BLK_RW_SYNC, HZ/50); |
