From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH for-next 2/3] io_uring: make io_uring_types.h public
Date: Thu, 16 Jun 2022 13:57:19 +0100 [thread overview]
Message-ID: <a15f12e8cb7289b2de0deaddcc7518d98a132d17.1655384063.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Move io_uring types to linux/include, need them public so tracing can
see the definitions and we can clean trace/events/io_uring.h
Signed-off-by: Pavel Begunkov <[email protected]>
---
{io_uring => include/linux}/io_uring_types.h | 28 ++++++++++++++++++--
io_uring/filetable.h | 11 --------
io_uring/io-wq.h | 17 +-----------
io_uring/io_uring.h | 4 ++-
io_uring/refs.h | 2 +-
5 files changed, 31 insertions(+), 31 deletions(-)
rename {io_uring => include/linux}/io_uring_types.h (96%)
diff --git a/io_uring/io_uring_types.h b/include/linux/io_uring_types.h
similarity index 96%
rename from io_uring/io_uring_types.h
rename to include/linux/io_uring_types.h
index 65ac7cdaaa73..779c72da5b8f 100644
--- a/io_uring/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -6,8 +6,32 @@
#include <linux/bitmap.h>
#include <uapi/linux/io_uring.h>
-#include "io-wq.h"
-#include "filetable.h"
+struct io_wq_work_node {
+ struct io_wq_work_node *next;
+};
+
+struct io_wq_work_list {
+ struct io_wq_work_node *first;
+ struct io_wq_work_node *last;
+};
+
+struct io_wq_work {
+ struct io_wq_work_node list;
+ unsigned flags;
+ /* place it here instead of io_kiocb as it fills padding and saves 4B */
+ int cancel_seq;
+};
+
+struct io_fixed_file {
+ /* file * with additional FFS_* flags */
+ unsigned long file_ptr;
+};
+
+struct io_file_table {
+ struct io_fixed_file *files;
+ unsigned long *bitmap;
+ unsigned int alloc_hint;
+};
struct io_hash_bucket {
spinlock_t lock;
diff --git a/io_uring/filetable.h b/io_uring/filetable.h
index c404360f7090..6b58aa48bc45 100644
--- a/io_uring/filetable.h
+++ b/io_uring/filetable.h
@@ -22,17 +22,6 @@ struct io_kiocb;
#endif
#define FFS_MASK ~(FFS_NOWAIT|FFS_ISREG|FFS_SCM)
-struct io_fixed_file {
- /* file * with additional FFS_* flags */
- unsigned long file_ptr;
-};
-
-struct io_file_table {
- struct io_fixed_file *files;
- unsigned long *bitmap;
- unsigned int alloc_hint;
-};
-
bool io_alloc_file_tables(struct io_file_table *table, unsigned nr_files);
void io_free_file_tables(struct io_file_table *table);
diff --git a/io_uring/io-wq.h b/io_uring/io-wq.h
index 3f54ee2a8eeb..10b80ef78bb8 100644
--- a/io_uring/io-wq.h
+++ b/io_uring/io-wq.h
@@ -2,6 +2,7 @@
#define INTERNAL_IO_WQ_H
#include <linux/refcount.h>
+#include <linux/io_uring_types.h>
struct io_wq;
@@ -20,15 +21,6 @@ enum io_wq_cancel {
IO_WQ_CANCEL_NOTFOUND, /* work not found */
};
-struct io_wq_work_node {
- struct io_wq_work_node *next;
-};
-
-struct io_wq_work_list {
- struct io_wq_work_node *first;
- struct io_wq_work_node *last;
-};
-
#define wq_list_for_each(pos, prv, head) \
for (pos = (head)->first, prv = NULL; pos; prv = pos, pos = (pos)->next)
@@ -152,13 +144,6 @@ struct io_wq_work_node *wq_stack_extract(struct io_wq_work_node *stack)
return node;
}
-struct io_wq_work {
- struct io_wq_work_node list;
- unsigned flags;
- /* place it here instead of io_kiocb as it fills padding and saves 4B */
- int cancel_seq;
-};
-
static inline struct io_wq_work *wq_next_work(struct io_wq_work *work)
{
if (!work->list.next)
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h
index 3f6cad3d356c..16e46b09253a 100644
--- a/io_uring/io_uring.h
+++ b/io_uring/io_uring.h
@@ -3,7 +3,9 @@
#include <linux/errno.h>
#include <linux/lockdep.h>
-#include "io_uring_types.h"
+#include <linux/io_uring_types.h>
+#include "io-wq.h"
+#include "filetable.h"
#ifndef CREATE_TRACE_POINTS
#include <trace/events/io_uring.h>
diff --git a/io_uring/refs.h b/io_uring/refs.h
index 334c5ead4c43..1336de3f2a30 100644
--- a/io_uring/refs.h
+++ b/io_uring/refs.h
@@ -2,7 +2,7 @@
#define IOU_REQ_REF_H
#include <linux/atomic.h>
-#include "io_uring_types.h"
+#include <linux/io_uring_types.h>
/*
* Shamelessly stolen from the mm implementation of page reference checking,
--
2.36.1
next prev parent reply other threads:[~2022-06-16 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 12:57 [PATCH for-next 0/3] io_uring trace events clean up Pavel Begunkov
2022-06-16 12:57 ` [PATCH for-next 1/3] io_uring: kill extra io_uring_types.h includes Pavel Begunkov
2022-06-16 12:57 ` Pavel Begunkov [this message]
2022-06-16 12:57 ` [PATCH for-next 3/3] io_uring: clean up tracing events Pavel Begunkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a15f12e8cb7289b2de0deaddcc7518d98a132d17.1655384063.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox