qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v9 07/17] blockdev: adds bdrv_parse_aio to use i


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v9 07/17] blockdev: adds bdrv_parse_aio to use io_uring
Date: Fri, 4 Oct 2019 16:06:01 +0100
User-agent: Mutt/1.12.1 (2019-06-15)

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 <address@hidden> wrote:
> >
> >
> >
> > On Wed, 7 Aug, 2019, 17:15 Julia Suvorova, <address@hidden> wrote:
> >>
> >> On Fri, Aug 2, 2019 at 1:41 AM Aarushi Mehta <address@hidden> 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

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]