mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
Deprecate showing drive capacity and total free (#5976)
This addresses a situation that we shouldn't be displaying Total/Free anymore, instead we should simply show the total usage.
This commit is contained in:
committed by
kannappanr
parent
e6ec645035
commit
000e360196
13
cmd/xl-v1.go
13
cmd/xl-v1.go
@@ -173,10 +173,7 @@ func getStorageInfo(disks []StorageAPI) StorageInfo {
|
||||
validDisksInfo := sortValidDisksInfo(disksInfo)
|
||||
// If there are no valid disks, set total and free disks to 0
|
||||
if len(validDisksInfo) == 0 {
|
||||
return StorageInfo{
|
||||
Total: 0,
|
||||
Free: 0,
|
||||
}
|
||||
return StorageInfo{}
|
||||
}
|
||||
|
||||
_, sscParity := getRedundancyCount(standardStorageClass, len(disks))
|
||||
@@ -192,13 +189,7 @@ func getStorageInfo(disks []StorageAPI) StorageInfo {
|
||||
availableDataDisks = uint64(onlineDisks)
|
||||
}
|
||||
|
||||
// Return calculated storage info, choose the lowest Total and
|
||||
// Free as the total aggregated values. Total capacity is always
|
||||
// the multiple of smallest disk among the disk list.
|
||||
storageInfo := StorageInfo{
|
||||
Total: validDisksInfo[0].Total * availableDataDisks,
|
||||
Free: validDisksInfo[0].Free * availableDataDisks,
|
||||
}
|
||||
storageInfo := StorageInfo{}
|
||||
|
||||
// Combine all disks to get total usage.
|
||||
var used uint64
|
||||
|
||||
Reference in New Issue
Block a user