Skip to content

Commit

Permalink
Temporally disable posix_fallocate on os_file_set_size because
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Jan Lindström committed Dec 20, 2013
1 parent f023715 commit f6a1965
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions storage/innobase/os/os0file.cc
Expand Up @@ -386,6 +386,9 @@ os_file_set_atomic_writes(

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

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

current_size = 0;

/* JAN: TODO: Disable posix_fallocate file extension for Fusion-io
because currently it assumes that pages are initialized by zeroes
#ifdef HAVE_POSIX_FALLOCATE
if (srv_use_posix_fallocate) {
Expand All @@ -2300,6 +2305,7 @@ os_file_set_size(
return(TRUE);
}
#endif
*/


/* Write up to 1 megabyte at a time. */
Expand Down

0 comments on commit f6a1965

Please sign in to comment.