mount: stats report physical size instead of logical size

This commit is contained in:
chrislu
2022-06-26 12:14:34 -07:00
parent f77eda4b4f
commit 3142e77eca
2 changed files with 4 additions and 3 deletions

View File

@@ -209,8 +209,9 @@ func (ms *MasterServer) Statistics(ctx context.Context, req *master_pb.Statistic
volumeLayout := ms.Topo.GetVolumeLayout(req.Collection, replicaPlacement, ttl, types.ToDiskType(req.DiskType))
stats := volumeLayout.Stats()
totalSize := ms.Topo.GetDiskUsages().GetMaxVolumeCount() * int64(ms.option.VolumeSizeLimitMB)
resp := &master_pb.StatisticsResponse{
TotalSize: stats.TotalSize,
TotalSize: uint64(totalSize),
UsedSize: stats.UsedSize,
FileCount: stats.FileCount,
}