f2fs: avoid out-of-order execution of atomic writes
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 3 Feb 2017 02:18:06 +0000 (18:18 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 23 Feb 2017 18:10:35 +0000 (10:10 -0800)
commite7c75ab099c8c8d4616c2ac10517e86a88b368d1
treee19af673d391917611a269fe286418eba871b72d
parentfaa24895acfd49cb61055b762e39ee6a5452a389
f2fs: avoid out-of-order execution of atomic writes

We need to flush data writes before flushing last node block writes by using
FUA with PREFLUSH. We don't need to guarantee precedent node writes since if
those are not written, we can't reach to the last node block when scanning
node block chain during roll-forward recovery.
Afterwards f2fs_wait_on_page_writeback guarantees all the IO submission to
disk, which builds a valid node block chain.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c
fs/f2fs/node.c
include/trace/events/f2fs.h