projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
io_uring: use kernel header directly
[fio.git]
/
engines
/
io_uring.c
diff --git
a/engines/io_uring.c
b/engines/io_uring.c
index ebca08c874d446c11ab36c3dc8a94831742269e3..15a4d4753639ce3bf6ef73b1d752a491fc520129 100644
(file)
--- a/
engines/io_uring.c
+++ b/
engines/io_uring.c
@@
-20,28
+20,22
@@
#ifdef ARCH_HAVE_IOURING
#ifdef ARCH_HAVE_IOURING
-typedef uint64_t u64;
-typedef uint32_t u32;
-typedef int32_t s32;
-typedef uint16_t u16;
-typedef uint8_t u8;
-
#include "../os/io_uring.h"
struct io_sq_ring {
#include "../os/io_uring.h"
struct io_sq_ring {
- u
32
*head;
- u
32
*tail;
- u
32
*ring_mask;
- u
32
*ring_entries;
- u
32
*flags;
- u
32
*array;
+ u
nsigned
*head;
+ u
nsigned
*tail;
+ u
nsigned
*ring_mask;
+ u
nsigned
*ring_entries;
+ u
nsigned
*flags;
+ u
nsigned
*array;
};
struct io_cq_ring {
};
struct io_cq_ring {
- u
32
*head;
- u
32
*tail;
- u
32
*ring_mask;
- u
32
*ring_entries;
+ u
nsigned
*head;
+ u
nsigned
*tail;
+ u
nsigned
*ring_mask;
+ u
nsigned
*ring_entries;
struct io_uring_event *events;
};
struct io_uring_event *events;
};
@@
-211,7
+205,7
@@
static int fio_ioring_cqring_reap(struct thread_data *td, unsigned int events,
{
struct ioring_data *ld = td->io_ops_data;
struct io_cq_ring *ring = &ld->cq_ring;
{
struct ioring_data *ld = td->io_ops_data;
struct io_cq_ring *ring = &ld->cq_ring;
- u
32
head, reaped = 0;
+ u
nsigned
head, reaped = 0;
head = *ring->head;
do {
head = *ring->head;
do {
@@
-401,7
+395,7
@@
static int fio_ioring_mmap(struct ioring_data *ld, struct io_uring_params *p)
struct io_cq_ring *cring = &ld->cq_ring;
void *ptr;
struct io_cq_ring *cring = &ld->cq_ring;
void *ptr;
- ld->mmap[0].len = p->sq_off.array + p->sq_entries * sizeof(u32);
+ ld->mmap[0].len = p->sq_off.array + p->sq_entries * sizeof(
__
u32);
ptr = mmap(0, ld->mmap[0].len, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_POPULATE, ld->ring_fd,
IORING_OFF_SQ_RING);
ptr = mmap(0, ld->mmap[0].len, PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_POPULATE, ld->ring_fd,
IORING_OFF_SQ_RING);