aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location_ec.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-22 16:21:42 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-22 16:21:42 -0700
commit3137777d8395111f6c1eb4b3653e13f4961b8510 (patch)
tree14cfd08d09cd27c5886dd053a9af62b74f1188c5 /weed/storage/disk_location_ec.go
parent0bf148f49d63a834000f7bce63df2c0f4d78fa19 (diff)
downloadseaweedfs-3137777d8395111f6c1eb4b3653e13f4961b8510.tar.xz
seaweedfs-3137777d8395111f6c1eb4b3653e13f4961b8510.zip
volume: automatically detect max volume count
Diffstat (limited to 'weed/storage/disk_location_ec.go')
-rw-r--r--weed/storage/disk_location_ec.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/storage/disk_location_ec.go b/weed/storage/disk_location_ec.go
index f6c44e966..72d3e2b3e 100644
--- a/weed/storage/disk_location_ec.go
+++ b/weed/storage/disk_location_ec.go
@@ -183,3 +183,10 @@ func (l *DiskLocation) unmountEcVolumeByCollection(collectionName string) map[ne
}
return deltaVols
}
+
+func (l *DiskLocation) EcVolumesLen() int {
+ l.ecVolumesLock.RLock()
+ defer l.ecVolumesLock.RUnlock()
+
+ return len(l.ecVolumes)
+}