Skip to content

Commit f6a1965

Browse files
author
Jan Lindström
committed
Temporally disable posix_fallocate on os_file_set_size because
currently Fusion-io SSD drive does not support setting file size without fysically writing pages with zeroes when fallocate with PUCH_HOLE is used. Added additional error message if atomic write setup does not succeed.
1 parent f023715 commit f6a1965

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

storage/innobase/os/os0file.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ os_file_set_atomic_writes(
386386

387387
if (ioctl(file, DFS_IOCTL_ATOMIC_WRITE_SET, &atomic_option)) {
388388

389+
fprintf(stderr, "InnoDB: Error: trying to enable atomic writes on "
390+
"file %s on non-supported platform! Please restart with "
391+
"innodb_use_atomic_writes disabled.\n", name);
389392
os_file_handle_error_no_exit(name, "ioctl", FALSE, __FILE__, __LINE__);
390393
return(FALSE);
391394
}
@@ -2285,6 +2288,8 @@ os_file_set_size(
22852288

22862289
current_size = 0;
22872290

2291+
/* JAN: TODO: Disable posix_fallocate file extension for Fusion-io
2292+
because currently it assumes that pages are initialized by zeroes
22882293
#ifdef HAVE_POSIX_FALLOCATE
22892294
if (srv_use_posix_fallocate) {
22902295
@@ -2300,6 +2305,7 @@ os_file_set_size(
23002305
return(TRUE);
23012306
}
23022307
#endif
2308+
*/
23032309

23042310

23052311
/* Write up to 1 megabyte at a time. */

0 commit comments

Comments
 (0)