mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
remove ReadFileWithVerify from StorageAPI (#4947)
This change removes the ReadFileWithVerify function from the StorageAPI. The ReadFile was basically a redirection to ReadFileWithVerify. This change removes the redirection and moves the logic of ReadFileWithVerify directly into ReadFile. This removes a lot of unnecessary code in all StorageAPI implementations. Fixes #4946 * review: fix doc and typos
This commit is contained in:
committed by
Dee Koder
parent
4cadb33da2
commit
7e6b5bdbb7
@@ -95,13 +95,7 @@ func (s ErasureStorage) HealFile(staleDisks []StorageAPI, volume, path string,
|
||||
if int64(len(buffer)) != chunksize {
|
||||
buffer = make([]byte, chunksize)
|
||||
}
|
||||
if !verifiers[i].IsVerified() {
|
||||
_, err = disk.ReadFileWithVerify(volume, path,
|
||||
chunkOffset, buffer, verifiers[i])
|
||||
} else {
|
||||
_, err = disk.ReadFile(volume, path,
|
||||
chunkOffset, buffer)
|
||||
}
|
||||
_, err = disk.ReadFile(volume, path, chunkOffset, buffer, verifiers[i])
|
||||
if err != nil {
|
||||
// LOG FIXME: add a conditional log
|
||||
// for read failures, once per-disk
|
||||
|
||||
Reference in New Issue
Block a user