From: Jens Axboe Date: Tue, 20 Nov 2018 02:41:53 +0000 (-0700) Subject: engines/libaio: fix new aio poll API X-Git-Tag: fio-3.13~109 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=a1b006fe1cd3aa7e1b567f55e5a4c827d54f7c41 engines/libaio: fix new aio poll API It'll be final. Some day. Fixes: ebec344dd336 ("engines/libaio: update to new io_setup2() system call") Signed-off-by: Jens Axboe --- diff --git a/arch/arch-x86_64.h b/arch/arch-x86_64.h index 6361d52f..ac670d08 100644 --- a/arch/arch-x86_64.h +++ b/arch/arch-x86_64.h @@ -1,8 +1,8 @@ #ifndef ARCH_X86_64_H #define ARCH_X86_64_H -#ifndef __NR_sys_iosetup2 -#define __NR_sys_iosetup2 335 +#ifndef __NR_sys_io_setup2 +#define __NR_sys_io_setup2 335 #endif static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, diff --git a/engines/libaio.c b/engines/libaio.c index da7f0c3e..2a4d6534 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -361,7 +361,7 @@ static int fio_libaio_queue_init(struct libaio_data *ld, unsigned int depth, bool hipri) { #ifdef __NR_sys_io_setup2 - int err, flags = 0; + int flags = 0; if (hipri) flags = IOCTX_FLAG_IOPOLL; @@ -389,10 +389,7 @@ static int fio_libaio_init(struct thread_data *td) * care about the user ring. If that fails, the kernel is too old * and we need the right depth. */ - if (!o->userspace_reap) - err = fio_libaio_queue_init(ld, INT_MAX, o->hipri); - if (o->userspace_reap || err == -EINVAL) - err = fio_libaio_queue_init(ld, td->o.iodepth, o->hipri); + err = fio_libaio_queue_init(ld, td->o.iodepth, o->hipri); if (err) { td_verror(td, -err, "io_queue_init"); log_err("fio: check /proc/sys/fs/aio-max-nr\n");