]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: use crc and cp version to determine roll-forward recovery
authorJaegeuk Kim <jaegeuk@kernel.org>
Tue, 20 Sep 2016 00:55:10 +0000 (17:55 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 30 Sep 2016 17:05:46 +0000 (10:05 -0700)
commit172f2554f3587b8ab60453e9104a73f17d81e60c
tree87906aa2c4e349c0b04e8276de05cf956887e150
parent36545af672460fea18ac3a6083dbf0c64c95656a
f2fs: use crc and cp version to determine roll-forward recovery

Previously, we used cp_version only to detect recoverable dnodes.
In order to avoid same garbage cp_version, we needed to truncate the next
dnode during checkpoint, resulting in additional discard or data write.
If we can distinguish this by using crc in addition to cp_version, we can
remove this overhead.

There is backward compatibility concern where it changes node_footer layout.
So, this patch introduces a new checkpoint flag, CP_CRC_RECOVERY_FLAG, to
detect new layout. New layout will be activated only when this flag is set.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/node.h
fs/f2fs/recovery.c
fs/f2fs/segment.c
fs/f2fs/super.c
include/linux/f2fs_fs.h