mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-04 07:07:03 +00:00
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:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user