File tree Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Expand file tree Collapse file tree 4 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -5023,7 +5023,12 @@ fil_extend_space_to_desired_size(
5023
5023
= size_after_extend - start_page_no;
5024
5024
const os_offset_t len = os_offset_t (n_pages) * page_size;
5025
5025
5026
- int err = posix_fallocate (node->handle , start_offset, len);
5026
+ int err;
5027
+ do {
5028
+ err = posix_fallocate (node->handle , start_offset, len);
5029
+ } while (err == EINTR
5030
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
5031
+
5027
5032
success = !err;
5028
5033
if (!success) {
5029
5034
ib_logf (IB_LOG_LEVEL_ERROR, " extending file %s"
Original file line number Diff line number Diff line change @@ -2130,7 +2130,12 @@ os_file_set_size(
2130
2130
2131
2131
#ifdef HAVE_POSIX_FALLOCATE
2132
2132
if (srv_use_posix_fallocate) {
2133
- int err = posix_fallocate (file, 0 , size);
2133
+ int err;
2134
+ do {
2135
+ err = posix_fallocate (file, 0 , size);
2136
+ } while (err == EINTR
2137
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
2138
+
2134
2139
if (err) {
2135
2140
ib_logf (IB_LOG_LEVEL_ERROR,
2136
2141
" preallocating " INT64PF " bytes for"
Original file line number Diff line number Diff line change @@ -5063,7 +5063,12 @@ fil_extend_space_to_desired_size(
5063
5063
= size_after_extend - start_page_no;
5064
5064
const os_offset_t len = os_offset_t (n_pages) * page_size;
5065
5065
5066
- int err = posix_fallocate (node->handle , start_offset, len);
5066
+ int err;
5067
+ do {
5068
+ err = posix_fallocate (node->handle , start_offset, len);
5069
+ } while (err == EINTR
5070
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
5071
+
5067
5072
success = !err;
5068
5073
if (!success) {
5069
5074
ib_logf (IB_LOG_LEVEL_ERROR, " extending file %s"
Original file line number Diff line number Diff line change @@ -2348,7 +2348,12 @@ os_file_set_size(
2348
2348
2349
2349
#ifdef HAVE_POSIX_FALLOCATE
2350
2350
if (srv_use_posix_fallocate) {
2351
- int err = posix_fallocate (file, 0 , size);
2351
+ int err;
2352
+ do {
2353
+ err = posix_fallocate (file, 0 , size);
2354
+ } while (err == EINTR
2355
+ && srv_shutdown_state == SRV_SHUTDOWN_NONE);
2356
+
2352
2357
if (err) {
2353
2358
ib_logf (IB_LOG_LEVEL_ERROR,
2354
2359
" preallocating " INT64PF " bytes for"
You can’t perform that action at this time.
0 commit comments