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 <zab@versity.com>
This commit is contained in:
Zach Brown
2017-04-18 13:44:54 -07:00
parent 02af35a98e
commit 00fed84c68
+1 -1
View File
@@ -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;