mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
posix: Fix windows performance issues. (#3132)
Do not attempt to fetch volume/drive information for each i/o situation. In our case we do this in all calls `posix.go` this in-turn created a terrible situation for windows. This issue does not affect the i/o path on Unix platforms since statvfs calls are in the range of micro seconds on these platforms. This verification is only needed during startup and we let things fail at a later stage on windows.
This commit is contained in:
@@ -536,23 +536,6 @@ func TestListVols(t *testing.T) {
|
||||
if _, err = posixStorage.ListVols(); err != errDiskNotFound {
|
||||
t.Errorf("Expected to fail with \"%s\", but instead failed with \"%s\"", errDiskNotFound, err)
|
||||
}
|
||||
// creating a new posix instance.
|
||||
posixStorage, path, err = newPosixTestSetup()
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to create posix test setup, %s", err)
|
||||
}
|
||||
defer removeAll(path)
|
||||
// adding the segment of the path length of the volume to be > 255.
|
||||
if posixType, ok := posixStorage.(*posix); ok {
|
||||
// setting the disk Path with name whose segment length > 255.
|
||||
posixType.diskPath = "my-vol-name-0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
|
||||
} else {
|
||||
t.Errorf("Expected the StorageAPI to be of type *posix")
|
||||
}
|
||||
if _, err = posixStorage.ListVols(); err != errFileNameTooLong {
|
||||
t.Errorf("Expected to fail with \"%s\", but instead failed with \"%s\"", errFileNameTooLong, err)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// TestPosixListDir - Tests validate the directory listing functionality provided by posix.ListDir .
|
||||
|
||||
Reference in New Issue
Block a user