On Wed, Aug 7, 2019 at 2:06 PM Aarushi Mehta <[email protected]> wrote:
>
>
>
> On Wed, 7 Aug, 2019, 17:15 Julia Suvorova, <[email protected]> wrote:
>>
>> On Fri, Aug 2, 2019 at 1:41 AM Aarushi Mehta <[email protected]> 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.
Best regards, Julia Suvorova.
>> > +#ifdef CONFIG_LINUX_IO_URING
>> > + } else if (!strcmp(mode, "io_uring")) {
>> > + *flags |= BDRV_O_IO_URING;
>> > +#endif
>> > + } else {
>> > + return -1;
>> > + }
>> > +
>> > + return 0;
>> > +}