mirror of
https://github.com/minio/minio.git
synced 2025-03-31 17:53:43 -04:00
XL/Selfheal: skip reading from disk if ReadFile had returned error. (#1575)
This commit is contained in:
parent
c314a98c1a
commit
409e09c1e5
@ -117,6 +117,10 @@ func (xl XL) healFile(volume string, path string) error {
|
|||||||
// Skip reading if the part needs healing.
|
// Skip reading if the part needs healing.
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if reader == nil {
|
||||||
|
// If ReadFile() had returned error, do not read from this disk.
|
||||||
|
continue
|
||||||
|
}
|
||||||
_, err = io.ReadFull(reader, enBlocks[index])
|
_, err = io.ReadFull(reader, enBlocks[index])
|
||||||
if err != nil && err != io.ErrUnexpectedEOF {
|
if err != nil && err != io.ErrUnexpectedEOF {
|
||||||
enBlocks[index] = nil
|
enBlocks[index] = nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user