Revert: "f2fs: check last page index in cached bio to decide submission"
authorChao Yu <yuchao0@huawei.com>
Thu, 27 Sep 2018 15:41:16 +0000 (23:41 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 26 Oct 2018 18:23:48 +0000 (11:23 -0700)
commit08edfe4a51b530f2bc88f8ea59dd0248622d6b04
treebfc8a74fcf00235cb5a04bafff09d094d91c388f
parent58107a9c62f640e520610ef955826a58aa6c9edf
Revert: "f2fs: check last page index in cached bio to decide submission"

There is one case that we can leave bio in f2fs, result in hanging
page writeback waiter.

Thread A Thread B
- f2fs_write_cache_pages
 - f2fs_submit_page_write
 page #0 cached in bio #0 of cold log
 - f2fs_submit_page_write
 page #1 cached in bio #1 of warm log
- f2fs_write_cache_pages
 - f2fs_submit_page_write
 bio is full, submit bio #1 contain page #1
 - f2fs_submit_merged_write_cond(, page #1)
 fail to submit bio #0 due to page #1 is not in any cached bios.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/node.c
fs/f2fs/segment.c