summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/fil/fil0fil.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 93279667466..9905ab7d24f 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -3858,17 +3858,20 @@ fil_ibd_create(
success= false;
#ifdef HAVE_POSIX_FALLOCATE
- /*
- Extend the file using posix_fallocate(). This is required by
- FusionIO HW/Firmware but should also be the prefered way to extend
- a file.
- */
- int ret = posix_fallocate(file, 0, size * UNIV_PAGE_SIZE);
-
- if (ret == 0) {
+ /*
+ Extend the file using posix_fallocate(). This is required by
+ FusionIO HW/Firmware but should also be the prefered way to extend
+ a file.
+ */
+ int ret;
+ do {
+ ret = posix_fallocate(file, 0, size * UNIV_PAGE_SIZE);
+ } while (ret != 0 && ret != EINTR);
+
+ if (ret == 0) {
success = true;
} else if (ret != EINVAL) {
- ib::error() <<
+ ib::error() <<
"posix_fallocate(): Failed to preallocate"
" data for file " << path
<< ", desired size "