lkml.org 
[lkml]   [2018]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [f2fs-dev] [PATCH 1/2] f2fs: show precise # of blocks that user/root can use
From
Date
On 2018/1/4 2:58, Jaegeuk Kim wrote:
> Let's show precise # of blocks that user/root can use through bavail and bfree
> respectively.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> ---
> fs/f2fs/super.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 0a820ba55b10..4c1c99cf54ef 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1005,9 +1005,9 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
> buf->f_bsize = sbi->blocksize;
>
> buf->f_blocks = total_count - start_count;
> - buf->f_bfree = user_block_count - valid_user_blocks(sbi) + ovp_count;

Clean up unused ovp_count in this patch?

Thanks,

> - buf->f_bavail = user_block_count - valid_user_blocks(sbi) -
> + buf->f_bfree = user_block_count - valid_user_blocks(sbi) -
> sbi->current_reserved_blocks;
> + buf->f_bavail = buf->f_bfree;
>
> avail_node_count = sbi->total_node_count - sbi->nquota_files -
> F2FS_RESERVED_NODE_NUM;
>

\
 
 \ /
  Last update: 2018-01-04 02:13    [W:0.116 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site