summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-10-20 13:19:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-10-20 13:19:30 -0700
commit4962a85696f9439970bfd84f7ce23b2721f13549 (patch)
tree81d8b4eeb9ccbbd5a7cf458de07d5c35a54f417d /include
parent38525c6919e2f6b27c1855905f342a0def3cbdcf (diff)
parent9ba0d0c81284f4ec0b24529bdba2fc68b9d6a09a (diff)
Merge tag 'io_uring-5.10-2020-10-20' of git://git.kernel.dk/linux-block
Pull io_uring updates from Jens Axboe: "A mix of fixes and a few stragglers. In detail: - Revert the bogus __read_mostly that we discussed for the initial pull request. - Fix a merge window regression with fixed file registration error path handling. - Fix io-wq numa node affinities. - Series abstracting out an io_identity struct, making it both easier to see what the personality items are, and also easier to to adopt more. Use this to cover audit logging. - Fix for read-ahead disabled block condition in async buffered reads, and using single page read-ahead to unify what generic_file_buffer_read() path is used. - Series for REQ_F_COMP_LOCKED fix and removal of it (Pavel) - Poll fix (Pavel)" * tag 'io_uring-5.10-2020-10-20' of git://git.kernel.dk/linux-block: (21 commits) io_uring: use blk_queue_nowait() to check if NOWAIT supported mm: use limited read-ahead to satisfy read mm: mark async iocb read as NOWAIT once some data has been copied io_uring: fix double poll mask init io-wq: inherit audit loginuid and sessionid io_uring: use percpu counters to track inflight requests io_uring: assign new io_identity for task if members have changed io_uring: store io_identity in io_uring_task io_uring: COW io_identity on mismatch io_uring: move io identity items into separate struct io_uring: rely solely on work flags to determine personality. io_uring: pass required context in as flags io-wq: assign NUMA node locality if appropriate io_uring: fix error path cleanup in io_sqe_files_register() Revert "io_uring: mark io_uring_fops/io_op_defs as __read_mostly" io_uring: fix REQ_F_COMP_LOCKED by killing it io_uring: dig out COMP_LOCK from deep call chain io_uring: don't put a poll req under spinlock io_uring: don't unnecessarily clear F_LINK_TIMEOUT io_uring: don't set COMP_LOCKED if won't put ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/io_uring.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/include/linux/io_uring.h b/include/linux/io_uring.h
index 96315cfaf6d1..868364cea3b7 100644
--- a/include/linux/io_uring.h
+++ b/include/linux/io_uring.h
@@ -4,18 +4,33 @@
#include <linux/sched.h>
#include <linux/xarray.h>
-#include <linux/percpu-refcount.h>
+
+struct io_identity {
+ struct files_struct *files;
+ struct mm_struct *mm;
+#ifdef CONFIG_BLK_CGROUP
+ struct cgroup_subsys_state *blkcg_css;
+#endif
+ const struct cred *creds;
+ struct nsproxy *nsproxy;
+ struct fs_struct *fs;
+ unsigned long fsize;
+#ifdef CONFIG_AUDIT
+ kuid_t loginuid;
+ unsigned int sessionid;
+#endif
+ refcount_t count;
+};
struct io_uring_task {
/* submission side */
struct xarray xa;
struct wait_queue_head wait;
struct file *last;
- atomic_long_t req_issue;
-
- /* completion side */
- bool in_idle ____cacheline_aligned_in_smp;
- atomic_long_t req_complete;
+ struct percpu_counter inflight;
+ struct io_identity __identity;
+ struct io_identity *identity;
+ bool in_idle;
};
#if defined(CONFIG_IO_URING)