Revision 1e5b9d2f block/raw-posix.c

b/block/raw-posix.c
107 107
    int type;
108 108
    unsigned int lseek_err_cnt;
109 109
    int open_flags;
110
    void *aio_ctx;
111 110
#if defined(__linux__)
112 111
    /* linux floppy specific */
113 112
    int64_t fd_open_time;
......
117 116
#endif
118 117
#ifdef CONFIG_LINUX_AIO
119 118
    int use_aio;
119
    void *aio_ctx;
120 120
#endif
121 121
    uint8_t* aligned_buf;
122 122
} BDRVRawState;
......
185 185
    } else
186 186
#endif
187 187
    {
188
        s->aio_ctx = paio_init();
189
        if (!s->aio_ctx) {
188
        if (paio_init() < 0) {
190 189
            goto out_free_buf;
191 190
        }
192 191
#ifdef CONFIG_LINUX_AIO
......
558 557
        }
559 558
    }
560 559

  
561
    return paio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, nb_sectors,
560
    return paio_submit(bs, s->fd, sector_num, qiov, nb_sectors,
562 561
                       cb, opaque, type);
563 562
}
564 563

  
......
586 585
    if (fd_open(bs) < 0)
587 586
        return NULL;
588 587

  
589
    return paio_submit(bs, s->aio_ctx, s->fd, 0, NULL, 0,
590
    		       cb, opaque, QEMU_AIO_FLUSH);
588
    return paio_submit(bs, s->fd, 0, NULL, 0, cb, opaque, QEMU_AIO_FLUSH);
591 589
}
592 590

  
593 591
static void raw_close(BlockDriverState *bs)

Also available in: Unified diff