@@ -376,6 +376,10 @@ extern const char *innodb_checksum_algorithm_names[];
376
376
extern TYPELIB innodb_checksum_algorithm_typelib;
377
377
extern const char *innodb_flush_method_names[];
378
378
extern TYPELIB innodb_flush_method_typelib;
379
+ #ifdef __linux__
380
+ extern const char *innodb_linux_aio_names[];
381
+ extern TYPELIB innodb_linux_aio_typelib;
382
+ #endif
379
383
380
384
static const char *binlog_info_values[] = {" off" , " lockless" , " on" , " auto" ,
381
385
NullS};
@@ -1114,6 +1118,9 @@ enum options_xtrabackup
1114
1118
OPT_INNODB_READ_IO_THREADS,
1115
1119
OPT_INNODB_WRITE_IO_THREADS,
1116
1120
OPT_INNODB_USE_NATIVE_AIO,
1121
+ #ifdef __linux__
1122
+ OPT_INNODB_LINUX_AIO,
1123
+ #endif
1117
1124
OPT_INNODB_PAGE_SIZE,
1118
1125
OPT_INNODB_BUFFER_POOL_FILENAME,
1119
1126
OPT_INNODB_LOCK_WAIT_TIMEOUT,
@@ -1701,6 +1708,14 @@ struct my_option xb_server_options[] =
1701
1708
(G_PTR*) &srv_use_native_aio,
1702
1709
(G_PTR*) &srv_use_native_aio, 0 , GET_BOOL, NO_ARG,
1703
1710
TRUE , 0 , 0 , 0 , 0 , 0 },
1711
+ #ifdef __linux__
1712
+ {" innodb_linux_aio" , OPT_INNODB_LINUX_AIO,
1713
+ " Which linux AIO implementation to use, auto (io_uring, failing to aio) or explicit" ,
1714
+ (G_PTR*) &srv_linux_aio_method,
1715
+ (G_PTR*) &srv_linux_aio_method,
1716
+ &innodb_linux_aio_typelib, GET_ENUM, REQUIRED_ARG,
1717
+ SRV_LINUX_AIO_AUTO, 0 , 0 , 0 , 0 , 0 },
1718
+ #endif
1704
1719
{" innodb_page_size" , OPT_INNODB_PAGE_SIZE,
1705
1720
" The universal page size of the database." ,
1706
1721
(G_PTR*) &innobase_page_size, (G_PTR*) &innobase_page_size, 0 ,
@@ -2283,14 +2298,8 @@ static bool innodb_init_param()
2283
2298
2284
2299
ut_ad (DATA_MYSQL_BINARY_CHARSET_COLL == my_charset_bin.number );
2285
2300
2286
- #ifdef _WIN32
2301
+ #if defined( _WIN32) || defined(LINUX_NATIVE_AIO) || defined(HAVE_URING)
2287
2302
srv_use_native_aio = TRUE ;
2288
-
2289
- #elif defined(LINUX_NATIVE_AIO) || defined(HAVE_URING)
2290
-
2291
- if (srv_use_native_aio) {
2292
- msg (" InnoDB: Using %s" , srv_thread_pool->get_implementation ());
2293
- }
2294
2303
#else
2295
2304
/* Currently native AIO is supported only on windows and linux
2296
2305
and that also when the support is compiled in. In all other
@@ -4698,6 +4707,11 @@ static bool xtrabackup_backup_func()
4698
4707
msg (" Error: cannot initialize AIO subsystem" );
4699
4708
goto fail;
4700
4709
}
4710
+ #ifdef __linux__
4711
+ if (srv_use_native_aio) {
4712
+ msg (" InnoDB: Using %s" , srv_thread_pool->get_implementation ());
4713
+ }
4714
+ #endif
4701
4715
4702
4716
if (!log_sys.create ()) {
4703
4717
msg (" Error: cannot initialize log subsystem" );
0 commit comments