mirror of
https://github.com/pgsty/minio.git
synced 2026-10-07 10:15:58 +03:00
Avoid hiding disk errors in some cases in FS Shutdown (#2668)
This commit is contained in:
committed by
Harshavardhana
parent
241c56e6d7
commit
51e337228e
+6
-4
@@ -117,14 +117,16 @@ func (fs fsObjects) Shutdown() error {
|
||||
// List if there are any multipart entries.
|
||||
_, err := fs.storage.ListDir(minioMetaBucket, mpartMetaPrefix)
|
||||
if err != errFileNotFound {
|
||||
// Multipart directory is not empty hence do not remove '.minio.sys' volume.
|
||||
return nil
|
||||
// A nil err means that multipart directory is not empty hence do not remove '.minio.sys' volume.
|
||||
// A non nil err means that an unexpected error occured
|
||||
return err
|
||||
}
|
||||
// List if there are any bucket configuration entries.
|
||||
_, err = fs.storage.ListDir(minioMetaBucket, bucketConfigPrefix)
|
||||
if err != errFileNotFound {
|
||||
// Bucket config directory is not empty hence do not remove '.minio.sys' volume.
|
||||
return nil
|
||||
// A nil err means that bucket config directory is not empty hence do not remove '.minio.sys' volume.
|
||||
// A non nil err means that an unexpected error occured
|
||||
return err
|
||||
}
|
||||
// Cleanup everything else.
|
||||
prefix := ""
|
||||
|
||||
Reference in New Issue
Block a user