io_uring.c (6c9ae1ce82b65faa3f266fd103729878cf11e07e) io_uring.c (3cbc17ee92479ff56d0d6afecc0def6f7ec01153)
1/*
2 * Linux io_uring support.
3 *
4 * Copyright (C) 2009 IBM, Corp.
5 * Copyright (C) 2009 Red Hat, Inc.
6 * Copyright (C) 2019 Aarushi Mehta
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.

--- 35 unchanged lines hidden (view full) ---

44
45typedef struct LuringQueue {
46 unsigned int in_queue;
47 unsigned int in_flight;
48 bool blocked;
49 QSIMPLEQ_HEAD(, LuringAIOCB) submit_queue;
50} LuringQueue;
51
1/*
2 * Linux io_uring support.
3 *
4 * Copyright (C) 2009 IBM, Corp.
5 * Copyright (C) 2009 Red Hat, Inc.
6 * Copyright (C) 2019 Aarushi Mehta
7 *
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.

--- 35 unchanged lines hidden (view full) ---

44
45typedef struct LuringQueue {
46 unsigned int in_queue;
47 unsigned int in_flight;
48 bool blocked;
49 QSIMPLEQ_HEAD(, LuringAIOCB) submit_queue;
50} LuringQueue;
51
52typedef struct LuringState {
52struct LuringState {
53 AioContext *aio_context;
54
55 struct io_uring ring;
56
57 /* No locking required, only accessed from AioContext home thread */
58 LuringQueue io_q;
59
60 QEMUBH *completion_bh;
53 AioContext *aio_context;
54
55 struct io_uring ring;
56
57 /* No locking required, only accessed from AioContext home thread */
58 LuringQueue io_q;
59
60 QEMUBH *completion_bh;
61} LuringState;
61};
62
63/**
64 * luring_resubmit:
65 *
66 * Resubmit a request by appending it to submit_queue. The caller must ensure
67 * that ioq_submit() is called later so that submit_queue requests are started.
68 */
69static void luring_resubmit(LuringState *s, LuringAIOCB *luringcb)

--- 381 unchanged lines hidden ---
62
63/**
64 * luring_resubmit:
65 *
66 * Resubmit a request by appending it to submit_queue. The caller must ensure
67 * that ioq_submit() is called later so that submit_queue requests are started.
68 */
69static void luring_resubmit(LuringState *s, LuringAIOCB *luringcb)

--- 381 unchanged lines hidden ---