mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.0.0 -> release/2.1.0
* commit '883f321db71934a59d6b789d3febf7d8f5579def': 避免只使用第一个storage
This commit is contained in:
@@ -582,7 +582,8 @@ func (self *SHost) GetAttachedStorageCapacity() SStorageCapacity {
|
||||
func _getLeastUsedStorage(storages []SStorage, backends []string) *SStorage {
|
||||
var best *SStorage
|
||||
var bestCap int
|
||||
for _, s := range storages {
|
||||
for i := 0; i < len(storages); i++ {
|
||||
s := storages[i]
|
||||
if len(backends) > 0 {
|
||||
in, _ := utils.InStringArray(s.StorageType, backends)
|
||||
if !in {
|
||||
|
||||
Reference in New Issue
Block a user