mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
f2fs: avoid hungtask problem caused by losing wake_up
The D state of wait_on_all_pages_writeback should be waken by function f2fs_write_end_io when all writeback pages have been succesfully written to device. It's possible that wake_up comes between get_pages and io_schedule. Maybe in this case it will lost wake_up and still in D state even if all pages have been write back to device, and finally, the whole system will be into the hungtask state. if (!get_pages(sbi, F2FS_WRITEBACK)) break; <--------- wake_up io_schedule(); Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Biao He <hebiao6@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
d37aaf04b7
commit
76fa243e45
2 changed files with 2 additions and 1 deletions
|
@ -921,7 +921,7 @@ static void wait_on_all_pages_writeback(struct f2fs_sb_info *sbi)
|
|||
if (!get_pages(sbi, F2FS_WRITEBACK))
|
||||
break;
|
||||
|
||||
io_schedule();
|
||||
io_schedule_timeout(5*HZ);
|
||||
}
|
||||
finish_wait(&sbi->cp_wait, &wait);
|
||||
}
|
||||
|
|
|
@ -4767,6 +4767,7 @@ long __sched io_schedule_timeout(long timeout)
|
|||
delayacct_blkio_end();
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(io_schedule_timeout);
|
||||
|
||||
/**
|
||||
* sys_sched_get_priority_max - return maximum RT priority.
|
||||
|
|
Loading…
Reference in a new issue