mirror of
https://github.com/pgsty/minio.git
synced 2026-03-16 01:26:03 +01:00
further bootstrap/startup optimization for reading 'format.json' (#18868)
- Move RenameFile to websockets - Move ReadAll that is primarily is used for reading 'format.json' to to websockets - Optimize DiskInfo calls, and provide a way to make a NoOp DiskInfo call.
This commit is contained in:
@@ -1157,11 +1157,12 @@ func compressSelfTest() {
|
||||
// If a disk is nil or an error is returned the result will be nil as well.
|
||||
func getDiskInfos(ctx context.Context, disks ...StorageAPI) []*DiskInfo {
|
||||
res := make([]*DiskInfo, len(disks))
|
||||
opts := DiskInfoOptions{}
|
||||
for i, disk := range disks {
|
||||
if disk == nil {
|
||||
continue
|
||||
}
|
||||
if di, err := disk.DiskInfo(ctx, false); err == nil {
|
||||
if di, err := disk.DiskInfo(ctx, opts); err == nil {
|
||||
res[i] = &di
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user