mirror of
https://github.com/minio/minio.git
synced 2025-03-31 01:33:41 -04:00
Ignore disks with 0 total space (#14981)
Ignore disks with 0 total Mainly defensive to ensure no `/0` in percent calculation.
This commit is contained in:
parent
1b7dd70f72
commit
c0bf02b8b2
@ -336,7 +336,7 @@ func (z *erasureServerPools) getServerPoolsAvailableSpace(ctx context.Context, b
|
|||||||
}
|
}
|
||||||
var maxUsedPct int
|
var maxUsedPct int
|
||||||
for _, disk := range zinfo {
|
for _, disk := range zinfo {
|
||||||
if disk == nil {
|
if disk == nil || disk.Total == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
available += disk.Total - disk.Used
|
available += disk.Total - disk.Used
|
||||||
|
Loading…
x
Reference in New Issue
Block a user