fix: diskInfo should check diskID only if disk is online (#10058)

closes #10057
This commit is contained in:
Harshavardhana
2020-07-16 07:30:05 -07:00
committed by GitHub
parent 07eb24b775
commit 7b14e9b660
3 changed files with 20 additions and 7 deletions
+6 -2
View File
@@ -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
}