mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
After healing re-load disks with the new format (#5718)
This PR also fixes correct calculation of drive states before and after healing of objects. Fixes #5700 Fixes #5708
This commit is contained in:
committed by
Nitish Tiwari
parent
76d1e8bbcd
commit
6e9c853312
@@ -197,6 +197,12 @@ func getStorageInfo(disks []StorageAPI) StorageInfo {
|
||||
// This is the number of drives we report free and total space for
|
||||
availableDataDisks := uint64(onlineDisks - sscParity)
|
||||
|
||||
// Available data disks can be zero when onlineDisks is equal to parity,
|
||||
// at that point we simply choose online disks to calculate the size.
|
||||
if availableDataDisks == 0 {
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user