mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
add unformatted disk as part of the error list (#10128)
these errors should be ignored for quorum error calculation to ensure that we don't prematurely return unformatted disk error as part of API calls
This commit is contained in:
@@ -100,7 +100,9 @@ func cleanupDir(ctx context.Context, storage StorageAPI, volume, dirPath string)
|
||||
if !HasSuffix(entryPath, SlashSeparator) {
|
||||
// Delete the file entry.
|
||||
err := storage.DeleteFile(volume, entryPath)
|
||||
logger.LogIf(ctx, err)
|
||||
if err != errDiskNotFound && err != errUnformattedDisk {
|
||||
logger.LogIf(ctx, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -110,14 +112,18 @@ func cleanupDir(ctx context.Context, storage StorageAPI, volume, dirPath string)
|
||||
if err == errFileNotFound {
|
||||
return nil
|
||||
} else if err != nil { // For any other errors fail.
|
||||
logger.LogIf(ctx, err)
|
||||
if err != errDiskNotFound && err != errUnformattedDisk {
|
||||
logger.LogIf(ctx, err)
|
||||
}
|
||||
return err
|
||||
} // else on success..
|
||||
|
||||
// Entry path is empty, just delete it.
|
||||
if len(entries) == 0 {
|
||||
err = storage.DeleteFile(volume, entryPath)
|
||||
logger.LogIf(ctx, err)
|
||||
if err != errDiskNotFound && err != errUnformattedDisk {
|
||||
logger.LogIf(ctx, err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user