From 00fed84c6808b11636d9ed618089a0b0f3b0223d Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 10 Feb 2017 09:55:11 -0800 Subject: [PATCH] Build statfs f_blocks from total_segs Use the current total_segs field to calculate the total number of blocks in the system instead of the old and redundant total_segs field which is going away. Signed-off-by: Zach Brown --- kmod/src/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kmod/src/super.c b/kmod/src/super.c index 00b428a7..57dcbd46 100644 --- a/kmod/src/super.c +++ b/kmod/src/super.c @@ -60,7 +60,7 @@ static int scoutfs_statfs(struct dentry *dentry, struct kstatfs *kst) kst->f_bfree = scoutfs_alloc_bfree(sb); kst->f_type = SCOUTFS_SUPER_MAGIC; kst->f_bsize = SCOUTFS_BLOCK_SIZE; - kst->f_blocks = le64_to_cpu(super->total_blocks); + kst->f_blocks = le64_to_cpu(super->total_segs) * SCOUTFS_SEGMENT_BLOCKS; kst->f_bavail = kst->f_bfree; kst->f_ffree = kst->f_bfree * 17;