]> git.karo-electronics.de Git - linux-beck.git/commit
f2fs: fix wrong written_valid_blocks counting
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 15 Nov 2016 02:20:10 +0000 (18:20 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 25 Nov 2016 18:15:58 +0000 (10:15 -0800)
commitc79b7ff1d3c7710c23d8828a69d8cbc5597ad19f
treee9edc403cd3bee72408fab2be1cde725859a4c97
parent7702bdbe505a22380dd958e2ee35124c7c414806
f2fs: fix wrong written_valid_blocks counting

Previously, written_valid_blocks was got by ckpt->valid_block_count. But if
the last checkpoint has some NEW_ADDR due to power-cut, we can get wrong value.
Fix it to get the number from actual written block count from sit entries.

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