aboutsummaryrefslogtreecommitdiff
path: root/weed/topology/volume_location_list.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/topology/volume_location_list.go')
-rw-r--r--weed/topology/volume_location_list.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/topology/volume_location_list.go b/weed/topology/volume_location_list.go
index 03580ae5b..00bd8d199 100644
--- a/weed/topology/volume_location_list.go
+++ b/weed/topology/volume_location_list.go
@@ -82,12 +82,13 @@ func (dnll *VolumeLocationList) Refresh(freshThreshHold int64) {
}
}
+// Stats returns logic size and count
func (dnll *VolumeLocationList) Stats(vid needle.VolumeId, freshThreshHold int64) (size uint64, fileCount int) {
for _, dnl := range dnll.list {
if dnl.LastSeen < freshThreshHold {
vinfo, err := dnl.GetVolumesById(vid)
if err == nil {
- return (vinfo.Size - vinfo.DeletedByteCount) * uint64(len(dnll.list)), vinfo.FileCount - vinfo.DeleteCount
+ return (vinfo.Size - vinfo.DeletedByteCount), vinfo.FileCount - vinfo.DeleteCount
}
}
}