Skip to content

Commit

Permalink
io_uring: remove structures from include/linux/io_uring.h
Browse files Browse the repository at this point in the history
Link: https://lore.kernel.org/r/8c1d14f3748105f4caeda01716d47af2fa41d11c.1615809009.git.metze@samba.org
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Stefan Metzmacher authored and Jens Axboe committed Mar 18, 2021
1 parent 76cd979 commit 53e043b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
10 changes: 9 additions & 1 deletion fs/io-wq.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define INTERNAL_IO_WQ_H

#include <linux/refcount.h>
#include <linux/io_uring.h>

struct io_wq;

Expand All @@ -21,6 +20,15 @@ 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;
};

static inline void wq_list_add_after(struct io_wq_work_node *node,
struct io_wq_work_node *pos,
struct io_wq_work_list *list)
Expand Down
16 changes: 16 additions & 0 deletions fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,22 @@ struct io_ring_ctx {
struct list_head tctx_list;
};

struct io_uring_task {
/* submission side */
struct xarray xa;
struct wait_queue_head wait;
void *last;
void *io_wq;
struct percpu_counter inflight;
atomic_t in_idle;
bool sqpoll;

spinlock_t task_lock;
struct io_wq_work_list task_list;
unsigned long task_state;
struct callback_head task_work;
};

/*
* First field must be the file pointer in all the
* iocb unions! See also 'struct kiocb' in <linux/fs.h>
Expand Down
25 changes: 0 additions & 25 deletions include/linux/io_uring.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,6 @@
#include <linux/sched.h>
#include <linux/xarray.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_uring_task {
/* submission side */
struct xarray xa;
struct wait_queue_head wait;
void *last;
void *io_wq;
struct percpu_counter inflight;
atomic_t in_idle;
bool sqpoll;

spinlock_t task_lock;
struct io_wq_work_list task_list;
unsigned long task_state;
struct callback_head task_work;
};

#if defined(CONFIG_IO_URING)
struct sock *io_uring_get_socket(struct file *file);
void __io_uring_task_cancel(void);
Expand Down

0 comments on commit 53e043b

Please sign in to comment.