Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbeACS6t (ORCPT + 1 other); Wed, 3 Jan 2018 13:58:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:43474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbeACS6r (ORCPT ); Wed, 3 Jan 2018 13:58:47 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 38AE421707 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=jaegeuk@kernel.org From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 1/2] f2fs: show precise # of blocks that user/root can use Date: Wed, 3 Jan 2018 10:58:44 -0800 Message-Id: <20180103185845.29953-1-jaegeuk@kernel.org> X-Mailer: git-send-email 2.15.0.531.g2ccb3012c9-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Let's show precise # of blocks that user/root can use through bavail and bfree respectively. Signed-off-by: Jaegeuk Kim --- 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