mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
avoid reload of 'format.json' over the network under normal conditions (#18842)
This commit is contained in:
@@ -372,8 +372,6 @@ func (s *xlStorage) IsLocal() bool {
|
||||
|
||||
// Retrieve location indexes.
|
||||
func (s *xlStorage) GetDiskLoc() (poolIdx, setIdx, diskIdx int) {
|
||||
s.RLock()
|
||||
defer s.RUnlock()
|
||||
// If unset, see if we can locate it.
|
||||
if s.poolIndex < 0 || s.setIndex < 0 || s.diskIndex < 0 {
|
||||
return getXLDiskLoc(s.diskID)
|
||||
@@ -381,6 +379,12 @@ func (s *xlStorage) GetDiskLoc() (poolIdx, setIdx, diskIdx int) {
|
||||
return s.poolIndex, s.setIndex, s.diskIndex
|
||||
}
|
||||
|
||||
func (s *xlStorage) SetFormatData(b []byte) {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
s.formatData = b
|
||||
}
|
||||
|
||||
// Set location indexes.
|
||||
func (s *xlStorage) SetDiskLoc(poolIdx, setIdx, diskIdx int) {
|
||||
s.poolIndex = poolIdx
|
||||
|
||||
Reference in New Issue
Block a user