[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 10/16] io_uring: move LuringState typedef to block/aio.h
|
From: |
Paolo Bonzini |
|
Subject: |
[PULL 10/16] io_uring: move LuringState typedef to block/aio.h |
|
Date: |
Thu, 18 Jan 2024 13:24:10 +0100 |
The LuringState typedef is defined twice, in include/block/raw-aio.h and
block/io_uring.c. Move it in include/block/aio.h, which is included
everywhere the typedef is needed, since include/block/aio.h already has
to define the forward reference to the struct.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
include/block/aio.h | 8 ++++----
include/block/raw-aio.h | 1 -
block/io_uring.c | 4 ++--
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/include/block/aio.h b/include/block/aio.h
index c802a392e5e..5d0a1149881 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -55,7 +55,7 @@ typedef void IOHandler(void *opaque);
struct ThreadPool;
struct LinuxAioState;
-struct LuringState;
+typedef struct LuringState LuringState;
/* Is polling disabled? */
bool aio_poll_disabled(AioContext *ctx);
@@ -212,7 +212,7 @@ struct AioContext {
struct LinuxAioState *linux_aio;
#endif
#ifdef CONFIG_LINUX_IO_URING
- struct LuringState *linux_io_uring;
+ LuringState *linux_io_uring;
/* State for file descriptor monitoring using Linux io_uring */
struct io_uring fdmon_io_uring;
@@ -504,10 +504,10 @@ struct LinuxAioState *aio_setup_linux_aio(AioContext
*ctx, Error **errp);
struct LinuxAioState *aio_get_linux_aio(AioContext *ctx);
/* Setup the LuringState bound to this AioContext */
-struct LuringState *aio_setup_linux_io_uring(AioContext *ctx, Error **errp);
+LuringState *aio_setup_linux_io_uring(AioContext *ctx, Error **errp);
/* Return the LuringState bound to this AioContext */
-struct LuringState *aio_get_linux_io_uring(AioContext *ctx);
+LuringState *aio_get_linux_io_uring(AioContext *ctx);
/**
* aio_timer_new_with_attrs:
* @ctx: the aio context
diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h
index 0f63c2800ce..20e000b8ef8 100644
--- a/include/block/raw-aio.h
+++ b/include/block/raw-aio.h
@@ -65,7 +65,6 @@ void laio_attach_aio_context(LinuxAioState *s, AioContext
*new_context);
#endif
/* io_uring.c - Linux io_uring implementation */
#ifdef CONFIG_LINUX_IO_URING
-typedef struct LuringState LuringState;
LuringState *luring_init(Error **errp);
void luring_cleanup(LuringState *s);
diff --git a/block/io_uring.c b/block/io_uring.c
index 7cdd00e9f16..1e5886c30be 100644
--- a/block/io_uring.c
+++ b/block/io_uring.c
@@ -49,7 +49,7 @@ typedef struct LuringQueue {
QSIMPLEQ_HEAD(, LuringAIOCB) submit_queue;
} LuringQueue;
-typedef struct LuringState {
+struct LuringState {
AioContext *aio_context;
struct io_uring ring;
@@ -58,7 +58,7 @@ typedef struct LuringState {
LuringQueue io_q;
QEMUBH *completion_bh;
-} LuringState;
+};
/**
* luring_resubmit:
--
2.43.0
- [PULL 00/16] VGA, x86 TCG, misc changes for 2024-01-18, Paolo Bonzini, 2024/01/18
- [PULL 01/16] vga: use common endian swap macros, Paolo Bonzini, 2024/01/18
- [PULL 02/16] vga: introduce VGADisplayParams, Paolo Bonzini, 2024/01/18
- [PULL 03/16] vga: mask addresses in non-VESA modes to 256k, Paolo Bonzini, 2024/01/18
- [PULL 06/16] vga: reindent memory access code, Paolo Bonzini, 2024/01/18
- [PULL 07/16] vga: use latches in odd/even mode too, Paolo Bonzini, 2024/01/18
- [PULL 05/16] vga: optimize horizontal pel panning in 256-color modes, Paolo Bonzini, 2024/01/18
- [PULL 09/16] Add class property to configure KVM device node to use, Paolo Bonzini, 2024/01/18
- [PULL 10/16] io_uring: move LuringState typedef to block/aio.h,
Paolo Bonzini <=
- [PULL 13/16] target/i386: pcrel: store low bits of physical address in data[0], Paolo Bonzini, 2024/01/18
- [PULL 11/16] target/i386: Do not re-compute new pc with CF_PCREL, Paolo Bonzini, 2024/01/18
- [PULL 15/16] qemu/osdep: Add huge page aligned support on LoongArch platform, Paolo Bonzini, 2024/01/18
- [PULL 16/16] tests/tcg: Don't #include <inttypes.h> in aarch64/system/vtimer.c, Paolo Bonzini, 2024/01/18
- [PULL 12/16] target/i386: fix incorrect EIP in PC-relative translation blocks, Paolo Bonzini, 2024/01/18
- [PULL 08/16] vga: sort-of implement word and double-word access modes, Paolo Bonzini, 2024/01/18
- [PULL 14/16] remove unnecessary casts from uintptr_t, Paolo Bonzini, 2024/01/18
- [PULL 04/16] vga: implement horizontal pel panning in graphics modes, Paolo Bonzini, 2024/01/18
- Re: [PULL 00/16] VGA, x86 TCG, misc changes for 2024-01-18, Peter Maydell, 2024/01/19