mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user