f2fs: fix to flush multiple device in checkpoint
authorChao Yu <yuchao0@huawei.com>
Fri, 29 Sep 2017 05:59:39 +0000 (13:59 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 10 Oct 2017 19:49:53 +0000 (12:49 -0700)
commit1228b482c4ee26f3334dd83eb13bcf7e462f9c93
treed455026d467bb992187396da2ba104c80dd19694
parent39d787bec4f792e69e24b11aa3d61ae1c0e4830b
f2fs: fix to flush multiple device in checkpoint

If f2fs manages multiple devices, in checkpoint, we need to issue flush
in those devices which contain dirty data/node in their cache before
we write checkpoint region, otherwise, filesystem metadata could be
corrupted if hitting SPO after checkpoint.

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