XL/Selfheal: skip reading from disk if ReadFile had returned error. (#1575)

master
Krishna Srinivas 9 years ago committed by Harshavardhana
parent c314a98c1a
commit 409e09c1e5
  1. 4
      xl-erasure-v1-healfile.go

@ -117,6 +117,10 @@ func (xl XL) healFile(volume string, path string) error {
// Skip reading if the part needs healing.
continue
}
if reader == nil {
// If ReadFile() had returned error, do not read from this disk.
continue
}
_, err = io.ReadFull(reader, enBlocks[index])
if err != nil && err != io.ErrUnexpectedEOF {
enBlocks[index] = nil

Loading…
Cancel
Save