mirror of
https://github.com/minio/minio.git
synced 2025-11-22 02:35:30 -05:00
Do not append the endpoint for fs/xl disks in StorageInfo (#8472)
This commit is contained in:
committed by
kannappanr
parent
eac518b178
commit
fa325665b1
12
cmd/posix.go
12
cmd/posix.go
@@ -321,11 +321,15 @@ type DiskInfo struct {
|
||||
// total free inodes and underlying filesystem.
|
||||
func (s *posix) DiskInfo() (info DiskInfo, err error) {
|
||||
defer func() {
|
||||
if err == errFaultyDisk {
|
||||
if s != nil && err == errFaultyDisk {
|
||||
atomic.AddInt32(&s.ioErrCount, 1)
|
||||
}
|
||||
}()
|
||||
|
||||
if s == nil {
|
||||
return info, errFaultyDisk
|
||||
}
|
||||
|
||||
if atomic.LoadInt32(&s.ioErrCount) > maxAllowedIOError {
|
||||
return info, errFaultyDisk
|
||||
}
|
||||
@@ -344,7 +348,11 @@ func (s *posix) DiskInfo() (info DiskInfo, err error) {
|
||||
if err != nil {
|
||||
return info, err
|
||||
}
|
||||
localPeer := GetLocalPeer(globalEndpoints)
|
||||
|
||||
localPeer := ""
|
||||
if globalIsDistXL {
|
||||
localPeer = GetLocalPeer(globalEndpoints)
|
||||
}
|
||||
|
||||
return DiskInfo{
|
||||
Total: di.Total,
|
||||
|
||||
Reference in New Issue
Block a user