mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
remove SetDiskLoc() rely on the endpoint values instead (#19475)
the disk location never changes in the lifetime of a MinIO cluster, even if it did validate this close to the disk instead at the higher layer. Return appropriate errors indicating an invalid drive, so that the drive is not recognized as part of a valid drive.
This commit is contained in:
@@ -141,22 +141,6 @@ func getFileInfo(xlMetaBuf []byte, volume, path, versionID string, data, allPart
|
||||
return fi, nil
|
||||
}
|
||||
|
||||
// getXLDiskLoc will return the pool/set/disk id if it can be located in the object layer.
|
||||
// Will return -1 for unknown values.
|
||||
func getXLDiskLoc(diskID string) (poolIdx, setIdx, diskIdx int) {
|
||||
if api := newObjectLayerFn(); api != nil {
|
||||
if globalIsErasureSD {
|
||||
return 0, 0, 0
|
||||
}
|
||||
if ep, ok := api.(*erasureServerPools); ok {
|
||||
if pool, set, disk, err := ep.getPoolAndSet(diskID); err == nil {
|
||||
return pool, set, disk
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1, -1, -1
|
||||
}
|
||||
|
||||
// hashDeterministicString will return a deterministic hash for the map values.
|
||||
// Trivial collisions are avoided, but this is by no means a strong hash.
|
||||
func hashDeterministicString(m map[string]string) uint64 {
|
||||
|
||||
Reference in New Issue
Block a user