On Wed, Aug 07, 2019 at 02:49:51PM +0200, Julia Suvorova via Qemu-devel wrote: > On Wed, Aug 7, 2019 at 2:06 PM Aarushi Mehta wrote: > > > > > > > > On Wed, 7 Aug, 2019, 17:15 Julia Suvorova, wrote: > >> > >> On Fri, Aug 2, 2019 at 1:41 AM Aarushi Mehta wrote: > >> > +int bdrv_parse_aio(const char *mode, int *flags) > >> > +{ > >> > + if (!strcmp(mode, "threads")) { > >> > + /* do nothing, default */ > >> > + } else if (!strcmp(mode, "native")) { > >> > + *flags |= BDRV_O_NATIVE_AIO; > >> > >> This 'if' should be covered with CONFIG_LINUX_AIO. > > > > > > The aio=native definition is shared with Windows hosts' native aio and will break if it was covered. > > > > file-posix handles the case. > > Fair enough. Then you can remove all ifdefs for io_uring from > raw_open_common in file-posix.c as this case was already checked here. This is not possible since the BLOCKDEV_AIO_OPTIONS_IO_URING enum constant is conditional in the QAPI schema: { 'enum': 'BlockdevAioOptions', 'data': [ 'threads', 'native', { 'name': 'io_uring', 'if': 'defined(CONFIG_LINUX_IO_URING)' } ] } The code can only use BLOCKDEV_AIO_OPTIONS_IO_URING if CONFIG_LINUX_IO_URING was defined, so we cannot drop the #ifdefs in raw_open_common(). Stefan