Automatic merge from release/2.0.0 -> release/2.1.0

* commit '883f321db71934a59d6b789d3febf7d8f5579def':
  避免只使用第一个storage
This commit is contained in:
邱剑
2018-09-12 19:29:08 +08:00
+2 -1
View File
@@ -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 {