]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - fs/f2fs/inode.c
f2fs: measure inode.i_blocks as generic filesystem
authorChao Yu <yuchao0@huawei.com>
Wed, 14 Jun 2017 15:00:56 +0000 (23:00 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Jul 2017 09:11:48 +0000 (02:11 -0700)
commit0eb0adadf2e49d82bc4ecd65ec3bb69251f7564c
treed359aa474ee6aebd7402471c0bca82af248b1cc3
parent663f387b713089463e37761bfa2561972c7f45ff
f2fs: measure inode.i_blocks as generic filesystem

Both in memory or on disk, generic filesystems record i_blocks with
512bytes sized sector count, also VFS sub module such as disk quota
follows this rule, but f2fs records it with 4096bytes sized block
count, this difference leads to that once we use dquota's function
which inc/dec iblocks, it will make i_blocks of f2fs being inconsistent
between in memory and on disk.

In order to resolve this issue, this patch changes to make in-memory
i_blocks of f2fs recording sector count instead of block count,
meanwhile leaving on-disk i_blocks recording block count.

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