mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05: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
|
||||
for _, disk := range zinfo {
|
||||
if disk == nil {
|
||||
if disk == nil || disk.Total == 0 {
|
||||
continue
|
||||
}
|
||||
available += disk.Total - disk.Used
|
||||
|
Loading…
Reference in New Issue
Block a user