summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/innobase/fil/fil0fil.cc7
-rw-r--r--storage/innobase/os/os0file.cc7
-rw-r--r--storage/xtradb/fil/fil0fil.cc7
-rw-r--r--storage/xtradb/os/os0file.cc7
4 files changed, 24 insertions, 4 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index b0d489cf701..72ee8d74a82 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -5023,7 +5023,12 @@ retry:
= size_after_extend - start_page_no;
const os_offset_t len = os_offset_t(n_pages) * page_size;
- int err = posix_fallocate(node->handle, start_offset, len);
+ int err;
+ do {
+ err = posix_fallocate(node->handle, start_offset, len);
+ } while (err == EINTR
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
+
success = !err;
if (!success) {
ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s"
diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc
index 9fdd52bf736..eb8b3a53d32 100644
--- a/storage/innobase/os/os0file.cc
+++ b/storage/innobase/os/os0file.cc
@@ -2130,7 +2130,12 @@ os_file_set_size(
#ifdef HAVE_POSIX_FALLOCATE
if (srv_use_posix_fallocate) {
- int err = posix_fallocate(file, 0, size);
+ int err;
+ do {
+ err = posix_fallocate(file, 0, size);
+ } while (err == EINTR
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
+
if (err) {
ib_logf(IB_LOG_LEVEL_ERROR,
"preallocating " INT64PF " bytes for"
diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc
index 3b0b1da57e9..1a866a693ca 100644
--- a/storage/xtradb/fil/fil0fil.cc
+++ b/storage/xtradb/fil/fil0fil.cc
@@ -5063,7 +5063,12 @@ retry:
= size_after_extend - start_page_no;
const os_offset_t len = os_offset_t(n_pages) * page_size;
- int err = posix_fallocate(node->handle, start_offset, len);
+ int err;
+ do {
+ err = posix_fallocate(node->handle, start_offset, len);
+ } while (err == EINTR
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
+
success = !err;
if (!success) {
ib_logf(IB_LOG_LEVEL_ERROR, "extending file %s"
diff --git a/storage/xtradb/os/os0file.cc b/storage/xtradb/os/os0file.cc
index 5e7a0251a00..bed201991e9 100644
--- a/storage/xtradb/os/os0file.cc
+++ b/storage/xtradb/os/os0file.cc
@@ -2348,7 +2348,12 @@ os_file_set_size(
#ifdef HAVE_POSIX_FALLOCATE
if (srv_use_posix_fallocate) {
- int err = posix_fallocate(file, 0, size);
+ int err;
+ do {
+ err = posix_fallocate(file, 0, size);
+ } while (err == EINTR
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
+
if (err) {
ib_logf(IB_LOG_LEVEL_ERROR,
"preallocating " INT64PF " bytes for"