linux-stable/io_uring
Jens Axboe f6b543fd03 io_uring: ensure REQ_F_ISREG is set async offload
If we're offloading requests directly to io-wq because IOSQE_ASYNC was
set in the sqe, we can miss hashing writes appropriately because we
haven't set REQ_F_ISREG yet. This can cause a performance regression
with buffered writes, as io-wq then no longer correctly serializes writes
to that file.

Ensure that we set the flags in io_prep_async_work(), which will cause
the io-wq work item to be hashed appropriately.

Fixes: 584b0180f0 ("io_uring: move read/write file prep state into actual opcode handler")
Link: https://lore.kernel.org/io-uring/20220608080054.GB22428@xsang-OptiPlex-9020/
Reported-by: kernel test robot <oliver.sang@intel.com>
Tested-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-24 18:39:18 -06:00
..
Makefile io_uring: move opcode table to opdef.c 2022-07-24 18:39:12 -06:00
advise.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
advise.h io_uring: split out fadvise/madvise operations 2022-07-24 18:39:11 -06:00
alloc_cache.h io_uring: impose max limit on apoll cache 2022-07-24 18:39:17 -06:00
cancel.c io_uring: add sync cancelation API through io_uring_register() 2022-07-24 18:39:15 -06:00
cancel.h io_uring: add sync cancelation API through io_uring_register() 2022-07-24 18:39:15 -06:00
epoll.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
epoll.h io_uring: move epoll handler to its own file 2022-07-24 18:39:11 -06:00
fdinfo.c io_uring: move a few private types to local headers 2022-07-24 18:39:14 -06:00
fdinfo.h io_uring: move fdinfo helpers to its own file 2022-07-24 18:39:12 -06:00
filetable.c io_uring: let to set a range for file slot allocation 2022-07-24 18:39:16 -06:00
filetable.h io_uring: let to set a range for file slot allocation 2022-07-24 18:39:16 -06:00
fs.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
fs.h io_uring: split out filesystem related operations 2022-07-24 18:39:11 -06:00
io-wq.c io_uring: dedup io_run_task_work 2022-07-24 18:39:15 -06:00
io-wq.h io_uring: move list helpers to a separate file 2022-07-24 18:39:15 -06:00
io_uring.c io_uring: ensure REQ_F_ISREG is set async offload 2022-07-24 18:39:18 -06:00
io_uring.h io_uring: ensure REQ_F_ISREG is set async offload 2022-07-24 18:39:18 -06:00
kbuf.c io_uring: allow 0 length for buffer select 2022-07-24 18:39:16 -06:00
kbuf.h io_uring: restore bgid in io_put_kbuf 2022-07-24 18:39:16 -06:00
msg_ring.c io_uring: add allow_overflow to io_post_aux_cqe 2022-07-24 18:39:17 -06:00
msg_ring.h io_uring: move msg_ring into its own file 2022-07-24 18:39:12 -06:00
net.c net: fix compat pointer in get_compat_msghdr() 2022-07-24 18:39:18 -06:00
net.h io_uring: support multishot in recvmsg 2022-07-24 18:39:18 -06:00
nop.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
nop.h io_uring: move nop into its own file 2022-07-24 18:39:11 -06:00
opdef.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
opdef.h io_uring: move opcode table to opdef.c 2022-07-24 18:39:12 -06:00
openclose.c io_uring: split out fixed file installation and removal 2022-07-24 18:39:16 -06:00
openclose.h io_uring: split out fixed file installation and removal 2022-07-24 18:39:16 -06:00
poll.c io_uring: add abstraction around apoll cache 2022-07-24 18:39:17 -06:00
poll.h io_uring: add abstraction around apoll cache 2022-07-24 18:39:17 -06:00
refs.h io_uring: make io_uring_types.h public 2022-07-24 18:39:14 -06:00
rsrc.c io_uring: Use atomic_long_try_cmpxchg in __io_account_mem 2022-07-24 18:39:18 -06:00
rsrc.h io_uring: move io_import_fixed() 2022-07-24 18:39:15 -06:00
rw.c io_uring: ensure REQ_F_ISREG is set async offload 2022-07-24 18:39:18 -06:00
rw.h io_uring: move read/write related opcodes to its own file 2022-07-24 18:39:12 -06:00
slist.h io_uring: move list helpers to a separate file 2022-07-24 18:39:15 -06:00
splice.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
splice.h io_uring: split out splice related operations 2022-07-24 18:39:11 -06:00
sqpoll.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
sqpoll.h io_uring: move SQPOLL related handling into its own file 2022-07-24 18:39:12 -06:00
statx.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
statx.h io_uring: move statx handling to its own file 2022-07-24 18:39:11 -06:00
sync.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
sync.h io_uring: split out fs related sync/fallocate functions 2022-07-24 18:39:11 -06:00
tctx.c io_uring: lockless task list 2022-07-24 18:39:15 -06:00
tctx.h io_uring: lockless task list 2022-07-24 18:39:15 -06:00
timeout.c io_uring: improve io_fail_links() 2022-07-24 18:39:16 -06:00
timeout.h io_uring: move a few private types to local headers 2022-07-24 18:39:14 -06:00
uring_cmd.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
uring_cmd.h io_uring: move uring_cmd handling to its own file 2022-07-24 18:39:11 -06:00
xattr.c io_uring: kill extra io_uring_types.h includes 2022-07-24 18:39:14 -06:00
xattr.h io_uring: move xattr related opcodes to its own file 2022-07-24 18:39:11 -06:00