summaryrefslogtreecommitdiff
path: root/kernel/events
diff options
context:
space:
mode:
authorYunlei He <heyunlei@huawei.com>2016-11-16 17:26:24 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2016-11-25 10:16:00 -0800
commitd40a43af0a57a017eba9ad2679183791587ceb6a (patch)
treebe4c456502fea0ac9e07303955f087bd4e72559f /kernel/events
parent36951b38d13ac7cce9fcf89e0e01c22ed0d05688 (diff)
f2fs: fix an infinite loop when flush nodes in cp
Thread A Thread B - write_checkpoint - block_operations -blk_start_plug -sync_node_pages - f2fs_do_sync_file - fsync_node_pages - f2fs_wait_on_page_writeback Thread A wait for global F2FS_DIRTY_NODES decreased to zero, it start a plug list, some requests have been added to this list. Thread B lock one dirty node page, and wait this page write back. But this page has been in plug list of thread A with PG_writeback flag. Thread A keep on running and its plug list has no chance to finish, so it seems a deadlock between cp and fsync path. This patch add a wait on page write back before set node page dirty to avoid this problem. Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Pengyang Hou <houpengyang@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'kernel/events')
0 files changed, 0 insertions, 0 deletions