#include "lib/util/dlinklist.h"
#include "lib/util/debug.h"
#include "lib/util/fault.h"
+#include <liburing.h>
#include "lib/util/samba_io_uring.h"
#ifdef HAVE_IO_URING_GET_PROBE_RING
#ifndef HAVE_IO_URING_FREE_PROBE
+struct io_uring_probe;
static void io_uring_free_probe(struct io_uring_probe *probe)
{
free(probe);
#ifndef __SAMBA_IO_URING_H__
#define __SAMBA_IO_URING_H__ 1
-#ifdef HAVE_LIBURING
-#include <liburing.h>
+
+#define HAVE_IO_URING_GET_PROBE_RING 1
+
+/*
+ * If IORING_SETUP_IOPOLL is defined
+ * we have already included <liburing.h>
+ */
+#ifdef IORING_SETUP_IOPOLL
+#define __SAMBA_IO_URING_INTERNALS 1
+#endif
struct samba_io_uring;
struct samba_io_uring_request;
void (*completion_fn)(struct samba_io_uring_qe *qe,
const char *location);
bool force_async;
- struct io_uring_sqe sqe;
- struct io_uring_cqe cqe;
+ union {
+ uint64_t __sqe_align8;
+ uint8_t __sqe_space[SIZEOF_STRUCT_IO_URING_SQE];
+#ifdef __SAMBA_IO_URING_INTERNALS
+ struct io_uring_sqe sqe;
+#endif /* __SAMBA_IO_URING_INTERNALS */
+ };
+ union {
+ uint64_t __cqe_align8;
+ uint8_t __cqe_space[SIZEOF_STRUCT_IO_URING_SQE];
+#ifdef __SAMBA_IO_URING_INTERNALS
+ struct io_uring_cqe cqe;
+#endif /* __SAMBA_IO_URING_INTERNALS */
+ };
uint8_t idx;
};
void samba_io_uring_request_submit(struct samba_io_uring *ring,
struct samba_io_uring_request *r);
-#endif /* HAVE_LIBURING */
#endif /* __SAMBA_IO_URING_H__ */
headers='liburing.h')
conf.CHECK_FUNCS_IN('io_uring_free_probe', 'uring',
headers='liburing.h')
+ conf.CHECK_SIZEOF('"struct io_uring_sqe" "struct io_uring_cqe"',
+ lib='uring', headers='liburing.h')
conf.DEFINE('HAVE_LIBURING', '1')