diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-03 12:03:33 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-03-03 12:03:33 +0200 |
commit | 29c776cfd1e560846e394f39d79ae43ff7d70c61 (patch) | |
tree | f53fecb2ec18c6b9102e8c428c2dc950661a44b0 /storage/xtradb/fil/fil0fil.cc | |
parent | d04d835f64b39edf0310e0471a7ed261b5cb2a20 (diff) | |
download | mariadb-git-29c776cfd1e560846e394f39d79ae43ff7d70c61.tar.gz |
MDEV-11520: Retry posix_fallocate() after EINTR.
The function posix_fallocate() as well as the Linux system call
fallocate() can return EINTR when the operation was interrupted
by a signal. In that case, keep retrying the operation, except
if InnoDB shutdown has been initiated.
Diffstat (limited to 'storage/xtradb/fil/fil0fil.cc')
-rw-r--r-- | storage/xtradb/fil/fil0fil.cc | 7 |
1 files changed, 6 insertions, 1 deletions
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" |