xtrabackup must use the same innodb_flush_method value on --backup, because direct and buffered I/O on the same file is a very bad idea according to kernel developers.
There's are no strict requirements to use O_DIRECT on --prepare. However, the problem here appears to be the following code in xtrabackup_close_temp_log():
xtrabackup must use the same innodb_flush_method value on --backup, because direct and buffered I/O on the same file is a very bad idea according to kernel developers.
There's are no strict requirements to use O_DIRECT on --prepare. However, the problem here appears to be the following code in xtrabackup_ close_temp_ log():
log_buf_ = static_cast<byte *>(ut_malloc( LOG_FILE_ HDR_SIZE * 2)); log_buf_ , LOG_FILE_ HDR_SIZE) );
log_buf = static_cast<byte *>(ut_align(
success = os_file_ read(src_ file, log_buf, 0, 0, LOG_FILE_HDR_SIZE);
It aligns the buffer to LOG_FILE_HDR_SIZE (2048 bytes) which is wrong. Using UNIV_PAGE_SIZE_MAX as done in other code parts should fix this.