|
|
@ -137,12 +137,18 @@ func (xl xlObjects) listObjectsHeal(bucket, prefix, marker, delimiter string, ma |
|
|
|
result.Prefixes = append(result.Prefixes, objInfo.Name) |
|
|
|
result.Prefixes = append(result.Prefixes, objInfo.Name) |
|
|
|
continue |
|
|
|
continue |
|
|
|
} |
|
|
|
} |
|
|
|
result.Objects = append(result.Objects, ObjectInfo{ |
|
|
|
// Check if the current object needs healing
|
|
|
|
Name: objInfo.Name, |
|
|
|
nsMutex.RLock(bucket, objInfo.Name) |
|
|
|
ModTime: objInfo.ModTime, |
|
|
|
partsMetadata, errs := readAllXLMetadata(xl.storageDisks, bucket, objInfo.Name) |
|
|
|
Size: objInfo.Size, |
|
|
|
if xlShouldHeal(partsMetadata, errs) { |
|
|
|
IsDir: false, |
|
|
|
result.Objects = append(result.Objects, ObjectInfo{ |
|
|
|
}) |
|
|
|
Name: objInfo.Name, |
|
|
|
|
|
|
|
ModTime: objInfo.ModTime, |
|
|
|
|
|
|
|
Size: objInfo.Size, |
|
|
|
|
|
|
|
IsDir: false, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
nsMutex.RUnlock(bucket, objInfo.Name) |
|
|
|
} |
|
|
|
} |
|
|
|
return result, nil |
|
|
|
return result, nil |
|
|
|
} |
|
|
|
} |
|
|
|