|
|
@ -363,11 +363,15 @@ func fsCreateFile(ctx context.Context, filePath string, reader io.Reader, buf [] |
|
|
|
// wrapper to handle various operating system specific errors.
|
|
|
|
// wrapper to handle various operating system specific errors.
|
|
|
|
func fsFAllocate(fd int, offset int64, len int64) (err error) { |
|
|
|
func fsFAllocate(fd int, offset int64, len int64) (err error) { |
|
|
|
e := Fallocate(fd, offset, len) |
|
|
|
e := Fallocate(fd, offset, len) |
|
|
|
// Ignore errors when Fallocate is not supported in the current system
|
|
|
|
if e != nil { |
|
|
|
if e != nil && !isSysErrNoSys(e) && !isSysErrOpNotSupported(e) { |
|
|
|
|
|
|
|
switch { |
|
|
|
switch { |
|
|
|
case isSysErrNoSpace(e): |
|
|
|
case isSysErrNoSpace(e): |
|
|
|
err = errDiskFull |
|
|
|
err = errDiskFull |
|
|
|
|
|
|
|
case isSysErrNoSys(e) || isSysErrOpNotSupported(e): |
|
|
|
|
|
|
|
// Ignore errors when Fallocate is not supported in the current system
|
|
|
|
|
|
|
|
case isSysErrInvalidArg(e): |
|
|
|
|
|
|
|
// Workaround for Windows Docker Engine 19.03.8.
|
|
|
|
|
|
|
|
// See https://github.com/minio/minio/issues/9726
|
|
|
|
case isSysErrIO(e): |
|
|
|
case isSysErrIO(e): |
|
|
|
err = e |
|
|
|
err = e |
|
|
|
default: |
|
|
|
default: |
|
|
|