mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09: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:
@@ -1216,7 +1216,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;
|
||||
if (unlikely(buf->f_bfree <= sbi->unusable_block_count))
|
||||
|
||||
Reference in New Issue
Block a user