mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
InnoDB, XtraDB: handle EOPNOTSUPP from posix_fallocate()
On some libc (like musl[1]), posix_fallocate() is a fallocate() syscall wrapper, and does not include fallback code like glibc does. In that case, EOPNOTSUPP is returned if underlying filesystem does not support fallocate() with mode = 0. This patch enables falling back to writing zeros when EOPNOTSUPP, fixes some cases like running on filesystem without proper fallocate support on Alpine. [1]: https://git.musl-libc.org/cgit/musl/tree/src/fcntl/posix_fallocate.c?h=v1.2.1
This commit is contained in:
parent
f0a57acb49
commit
3ee2422624
2 changed files with 2 additions and 0 deletions
|
@ -2427,6 +2427,7 @@ os_file_set_size(
|
|||
errno = err;
|
||||
return false;
|
||||
case EINVAL:
|
||||
case EOPNOTSUPP:
|
||||
/* fall back to the code below */
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -2716,6 +2716,7 @@ os_file_set_size(
|
|||
errno = err;
|
||||
return false;
|
||||
case EINVAL:
|
||||
case EOPNOTSUPP:
|
||||
/* fall back to the code below */
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue