aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location_ec.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/disk_location_ec.go')
-rw-r--r--weed/storage/disk_location_ec.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go
index 6d681d2c2..4050a7930 100644
--- a/weed/storage/disk_location_ec.go
+++ b/weed/storage/disk_location_ec.go
@@ -218,9 +218,13 @@ func (l *DiskLocation) unmountEcVolumeByCollection(collectionName string) map[ne
return deltaVols
}
-func (l *DiskLocation) EcVolumesLen() int {
+func (l *DiskLocation) EcShardCount() int {
l.ecVolumesLock.RLock()
defer l.ecVolumesLock.RUnlock()
- return len(l.ecVolumes)
+ shardCount := 0
+ for _, ecVolume := range l.ecVolumes {
+ shardCount += len(ecVolume.Shards)
+ }
+ return shardCount
}