fix: optimize DiskInfo() call avoid metrics when not needed (#17763)

This commit is contained in:
Harshavardhana
2023-07-31 15:20:48 -07:00
committed by GitHub
parent 8162fd1e20
commit 81be718674
27 changed files with 92 additions and 63 deletions
+1 -1
View File
@@ -1146,7 +1146,7 @@ func getDiskInfos(ctx context.Context, disks ...StorageAPI) []*DiskInfo {
if disk == nil {
continue
}
if di, err := disk.DiskInfo(ctx); err == nil {
if di, err := disk.DiskInfo(ctx, false); err == nil {
res[i] = &di
}
}