mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] f2fs: show precise # of blocks that user/root can use
@ 2018-01-03 18:58 Jaegeuk Kim
  2018-01-03 18:58 ` [PATCH 2/2] f2fs: add reserved blocks for root user Jaegeuk Kim
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jaegeuk Kim @ 2018-01-03 18:58 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

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;
-	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;
-- 
2.15.0.531.g2ccb3012c9-goog

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-01-08 11:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-03 18:58 [PATCH 1/2] f2fs: show precise # of blocks that user/root can use Jaegeuk Kim
2018-01-03 18:58 ` [PATCH 2/2] f2fs: add reserved blocks for root user Jaegeuk Kim
2018-01-04  6:51   ` [PATCH 2/2 v2] " Jaegeuk Kim
2018-01-04  7:21     ` [f2fs-dev] " Chao Yu
2018-01-05  4:43     ` [PATCH 2/2 v3] " Jaegeuk Kim
2018-01-05  8:04   ` [f2fs-dev] [PATCH 2/2] " Yunlong Song
2018-01-04  1:12 ` [f2fs-dev] [PATCH 1/2] f2fs: show precise # of blocks that user/root can use Chao Yu
2018-01-04  6:50 ` [PATCH 1/2 v2] " Jaegeuk Kim
2018-01-04  7:20   ` [f2fs-dev] " Chao Yu
2018-01-05  7:05 ` [f2fs-dev] [PATCH 1/2] " Yunlong Song
2018-01-08 11:23   ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome