mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Print log when EINVALID is encountered in storage layer (#13341)
EINVALID from the OS is not a common case and should be logger.
This commit is contained in:
parent
94d587e6fc
commit
f5be8ba11f
@ -17,7 +17,12 @@
|
|||||||
|
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import "errors"
|
import (
|
||||||
|
"context"
|
||||||
|
"errors"
|
||||||
|
|
||||||
|
"github.com/minio/minio/internal/logger"
|
||||||
|
)
|
||||||
|
|
||||||
// errUnexpected - unexpected error, requires manual intervention.
|
// errUnexpected - unexpected error, requires manual intervention.
|
||||||
var errUnexpected = StorageErr("unexpected error, please report this issue at https://github.com/minio/minio/issues")
|
var errUnexpected = StorageErr("unexpected error, please report this issue at https://github.com/minio/minio/issues")
|
||||||
@ -157,6 +162,7 @@ func osErrToFileErr(err error) error {
|
|||||||
return errFaultyDisk
|
return errFaultyDisk
|
||||||
}
|
}
|
||||||
if isSysErrInvalidArg(err) {
|
if isSysErrInvalidArg(err) {
|
||||||
|
logger.LogIf(context.Background(), err)
|
||||||
// For some odd calls with O_DIRECT reads
|
// For some odd calls with O_DIRECT reads
|
||||||
// filesystems can return EINVAL, handle
|
// filesystems can return EINVAL, handle
|
||||||
// these as FileNotFound instead.
|
// these as FileNotFound instead.
|
||||||
|
Loading…
Reference in New Issue
Block a user