mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
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:
parent
0729de642e
commit
4cde270453
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user