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, 19 Dec 2017 01:21:49 +0000 (17:21 -0800)
commit6b50d3ec7d114ea78319b046ab878cfee7d0cc33
treec4784b833bf5aefc0c45bad8452607c2975f2f86
parent5483b178450e2c814ab09ed297db19adeeba1a3d
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