mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
f2fs: flush stale issued discard candidates
Sometimes, I could observe # of issuing_discard to be 1 which blocks background jobs due to is_idle()=false. The only way to get out of it was to trigger gc_urgent. This patch avoids that by checking any candidates as done in the list. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
72691af6db
commit
76c7bfb3a8
@ -1652,6 +1652,10 @@ static int issue_discard_thread(void *data)
|
|||||||
if (dcc->discard_wake)
|
if (dcc->discard_wake)
|
||||||
dcc->discard_wake = 0;
|
dcc->discard_wake = 0;
|
||||||
|
|
||||||
|
/* clean up pending candidates before going to sleep */
|
||||||
|
if (atomic_read(&dcc->queued_discard))
|
||||||
|
__wait_all_discard_cmd(sbi, NULL);
|
||||||
|
|
||||||
if (try_to_freeze())
|
if (try_to_freeze())
|
||||||
continue;
|
continue;
|
||||||
if (f2fs_readonly(sbi->sb))
|
if (f2fs_readonly(sbi->sb))
|
||||||
|
Loading…
Reference in New Issue
Block a user