Skip to content
Commit f6b543fd authored by Jens Axboe's avatar Jens Axboe
Browse files

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: 584b0180 ("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: default avatarkernel test robot <oliver.sang@intel.com>
Tested-by: default avatarYin Fengwei <fengwei.yin@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4f6a94d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment