f2fs: fix the number of orphan inode blocks
authorWanpeng Li <wanpeng.li@linux.intel.com>
Wed, 25 Feb 2015 23:57:21 +0000 (07:57 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 Apr 2015 22:08:26 +0000 (15:08 -0700)
commit3c64298579a1343cbdf3d2f17adf774a58546aae
treed63194085ed8b60cd2f657056c427ba7a3cc16eb
parent551414861fbd494d58d50f4750d1d1b7f42b6df1
f2fs: fix the number of orphan inode blocks

cp_pack_start_sum is calculated in do_checkpoint and is equal to
cpu_to_le32(1 + cp_payload_blks + orphan_blocks). The number of
orphan inode blocks is take advantage of by recover_orphan_inodes
to readahead meta pages and recovery inodes. However, current codes
forget to reduce the number of cp payload blocks when calculate
the number of orphan inode blocks. This patch fix it.

Signed-off-by: Wanpeng Li <wanpeng.li@linux.intel.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c