mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Add support of fallocate for FS and XL backends (#3032)
This commit is contained in:
committed by
Harshavardhana
parent
0b3282ac9f
commit
a47ce7ab22
@@ -22,6 +22,26 @@ import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// Function not implemented error
|
||||
func isSysErrNoSys(err error) bool {
|
||||
return err != nil && err == syscall.ENOSYS
|
||||
}
|
||||
|
||||
// Not supported error
|
||||
func isSysErrOpNotSupported(err error) bool {
|
||||
return err != nil && err == syscall.EOPNOTSUPP
|
||||
}
|
||||
|
||||
// No space left on device error
|
||||
func isSysErrNoSpace(err error) bool {
|
||||
return err != nil && err == syscall.ENOSPC
|
||||
}
|
||||
|
||||
// Input/output error
|
||||
func isSysErrIO(err error) bool {
|
||||
return err != nil && err == syscall.EIO
|
||||
}
|
||||
|
||||
// Check if the given error corresponds to ENOTDIR (is not a directory)
|
||||
func isSysErrNotDir(err error) bool {
|
||||
if pathErr, ok := err.(*os.PathError); ok {
|
||||
|
||||
Reference in New Issue
Block a user