mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 05:30:24 +03:00
Report correct error when O_DIRECT is not supported (#9545)
fixes #9537
This commit is contained in:
+5
-1
@@ -131,8 +131,12 @@ func NewFSObjectLayer(fsPath string) (ObjectLayer, error) {
|
||||
var err error
|
||||
if fsPath, err = getValidPath(fsPath); err != nil {
|
||||
if err == errMinDiskSize {
|
||||
return nil, err
|
||||
return nil, config.ErrUnableToWriteInBackend(err).Hint(err.Error())
|
||||
} else if err == errUnsupportedDisk {
|
||||
hint := fmt.Sprintf("'%s' does not support O_DIRECT flags, refusing to use", fsPath)
|
||||
return nil, config.ErrUnsupportedBackend(err).Hint(hint)
|
||||
}
|
||||
|
||||
// Show a descriptive error with a hint about how to fix it.
|
||||
var username string
|
||||
if u, err := user.Current(); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user