avoid reload of 'format.json' over the network under normal conditions (#18842)

This commit is contained in:
Harshavardhana
2024-01-23 14:11:46 -08:00
committed by GitHub
parent 961f7dea82
commit 52229a21cb
11 changed files with 124 additions and 44 deletions

View File

@@ -109,6 +109,7 @@ type StorageAPI interface {
ReadAll(ctx context.Context, volume string, path string) (buf []byte, err error)
GetDiskLoc() (poolIdx, setIdx, diskIdx int) // Retrieve location indexes.
SetDiskLoc(poolIdx, setIdx, diskIdx int) // Set location indexes.
SetFormatData(b []byte) // Set formatData cached value
}
type unrecognizedDisk struct {
@@ -151,6 +152,9 @@ func (p *unrecognizedDisk) NSScanner(ctx context.Context, cache dataUsageCache,
return dataUsageCache{}, errDiskNotFound
}
func (p *unrecognizedDisk) SetFormatData(b []byte) {
}
func (p *unrecognizedDisk) GetDiskLoc() (poolIdx, setIdx, diskIdx int) {
return -1, -1, -1
}