OSDN Git Service

f2fs: don't count inode block in in-memory inode.i_blocks
authorChao Yu <yuchao0@huawei.com>
Wed, 5 Jul 2017 17:11:31 +0000 (01:11 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 13 Jul 2017 23:58:15 +0000 (16:58 -0700)
commit4f7f22b7c85a4b25247df14955c64761b401ebc5
treeb905cb80d5650b0248c24676c572712289c32cb9
parent0b359879b966344cb2aa51e3906b422dfd201974
f2fs: don't count inode block in in-memory inode.i_blocks

Previously, we count all inode consumed blocks including inode block,
xattr block, index block, data block into i_blocks, for other generic
filesystems, they won't count inode block into i_blocks, so for
userspace applications or quota system, they may detect incorrect block
count according to i_blocks value in inode.

This patch changes to count all blocks into inode.i_blocks excluding
inode block, for on-disk i_blocks, we keep counting inode block for
backward compatibility.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/inode.c
fs/f2fs/node.c