f2fs: modify f_blocks for statfs

The f_blocks of statfs include file system overhead,it is not normal
usage of Posix.

Change-Id: If481626b08c05290626938586e2dc721690f1a91
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
This commit is contained in:
Cliff Chen
2018-07-19 16:27:16 +08:00
committed by Tao Huang
parent 0729de642e
commit 4cde270453

View File

@@ -1543,7 +1543,8 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
buf->f_type = F2FS_SUPER_MAGIC;
buf->f_bsize = sbi->blocksize;
buf->f_blocks = total_count - start_count;
/* f_blocks should not include overhead of filesystem */
buf->f_blocks = user_block_count;
buf->f_bfree = user_block_count - valid_user_blocks(sbi) -
sbi->current_reserved_blocks;