f2fs: fix SSA updates resulting in corruption
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 7 Oct 2015 19:28:41 +0000 (12:28 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 12 Oct 2015 20:38:02 +0000 (13:38 -0700)
commit6e2c64ad7cebf8740c5e1241de374c6b6ea80f81
treec1b4ceed96d58f999d2d5c2725bd0429d876756a
parenta125702326d9c3b753fe9c9b9727d3b3dd1cba4a
f2fs: fix SSA updates resulting in corruption

The f2fs_collapse_range and f2fs_insert_range changes the block addresses
directly. But that can cause uncovered SSA updates.
In that case, we need to give up to change the block addresses and do buffered
writes to keep filesystem consistency.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/segment.c