Commit 6c4144a4 authored by Sergei Golubchik's avatar Sergei Golubchik

InnoDB: suppress posix_fallocate() failure errors when EINVAL

EINVAL means that the filesystem doesn't support posix_fallocate().

There were two places where this error was issued, one checked for
EINVAL, the other did not. This commit fixed the other place
to also check for EINVAL.

Also, remove the space after the REFMAN to get the valid url
with no space in the middle.

Also don't say "Make sure the file system supports this function."
when posix_fallocate() fails, because this message is only shown
when the filesystem does support this function.
parent ef0db6bf
......@@ -1052,6 +1052,7 @@ fil_write_zeros(
return(err);
}
/** Try to extend a tablespace.
@param[in,out] space tablespace to be extended
@param[in,out] node last file of the tablespace
......@@ -1136,10 +1137,9 @@ fil_space_extend_must_retry(
" Operating system error number "
<< ret << ". Check"
" that the disk is not full or a disk quota"
" exceeded. Make sure the file system supports"
" this function. Some operating system error"
" exceeded. Some operating system error"
" numbers are described at " REFMAN
" operating-system-error-codes.html";
"operating-system-error-codes.html";
} else
#endif
if (DB_SUCCESS != fil_write_zeros(
......@@ -3734,7 +3734,9 @@ fil_ibd_create(
*/
int ret = posix_fallocate(file, 0, size * UNIV_PAGE_SIZE);
if (ret != 0) {
if (ret == 0) {
success = true;
} else if (ret != EINVAL) {
ib::error() <<
"posix_fallocate(): Failed to preallocate"
" data for file " << path
......@@ -3743,13 +3745,10 @@ fil_ibd_create(
<< " Operating system error number " << ret
<< ". Check"
" that the disk is not full or a disk quota"
" exceeded. Make sure the file system supports"
" this function. Some operating system error"
" exceeded. Some operating system error"
" numbers are described at " REFMAN
" operating-system-error-codes.html";
} else {
success = true;
}
"operating-system-error-codes.html";
}
#endif /* HAVE_POSIX_FALLOCATE */
if (!success) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment