Commit a54455f5 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: shrink blk plug region

Don't use blk plug covering area where there won't be any IOs being issued.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 54c2258c
......@@ -853,9 +853,8 @@ static int issue_discard_thread(void *data)
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);
......@@ -865,6 +864,7 @@ static int issue_discard_thread(void *data)
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) {
......@@ -874,8 +874,6 @@ static int issue_discard_thread(void *data)
}
mutex_unlock(&dcc->cmd_lock);
blk_finish_plug(&plug);
iter = 0;
congestion_wait(BLK_RW_SYNC, HZ/50);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment