volume: automatically detect max volume count

This commit is contained in:
Chris Lu
2020-03-22 16:21:42 -07:00
parent 0bf148f49d
commit 3137777d83
6 changed files with 66 additions and 1 deletions

View File

@@ -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)
}