mirror of
https://github.com/pgsty/minio.git
synced 2026-10-06 17:55:59 +03:00
fix: diskInfo should check diskID only if disk is online (#10058)
closes #10057
This commit is contained in:
@@ -89,8 +89,12 @@ func (p *xlStorageDiskIDCheck) DiskInfo() (info DiskInfo, err error) {
|
||||
if err != nil {
|
||||
return info, err
|
||||
}
|
||||
if p.diskID != info.ID {
|
||||
return info, errDiskNotFound
|
||||
// check cached diskID against backend
|
||||
// only if its non-empty.
|
||||
if p.diskID != "" {
|
||||
if p.diskID != info.ID {
|
||||
return info, errDiskNotFound
|
||||
}
|
||||
}
|
||||
return info, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user