mirror of
https://github.com/minio/minio.git
synced 2025-11-22 18:47:43 -05:00
Return bit-rot verified data instead of re-reading from disk (#5568)
- Data from disk was being read after bitrot verification to return data for GetObject. Strictly speaking this does not guarantee bitrot protection, as disks may return bad data even temporarily. - This fix reads data from disk, verifies data for bitrot and then returns data to the client directly.
This commit is contained in:
committed by
Harshavardhana
parent
52eea7b9c1
commit
ea8973b7d7
@@ -610,7 +610,7 @@ func (s *posix) ReadFile(volume, path string, offset int64, buffer []byte, verif
|
||||
return 0, errIsNotRegular
|
||||
}
|
||||
|
||||
if verifier != nil && !verifier.IsVerified() {
|
||||
if verifier != nil {
|
||||
bufp := s.pool.Get().(*[]byte)
|
||||
defer s.pool.Put(bufp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user