Commit 6c91be54 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-11520 Properly retry posix_fallocate() on EINTR

We only want to retry posix_fallocate() on EINTR as long as the system
is not being shut down. We do not want to retry on any other (hard) error.

Thanks to Jocelyn Fournier for quickly noticing the mistake in my
previous commit.
parent 14c6f00a
......@@ -3866,7 +3866,8 @@ fil_ibd_create(
int ret;
do {
ret = posix_fallocate(file, 0, size * UNIV_PAGE_SIZE);
} while (ret != 0 && ret != EINTR);
} while (ret == EINTR
&& srv_shutdown_state == SRV_SHUTDOWN_NONE);
if (ret == 0) {
success = true;
......
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