mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
io_uring: only hash regular files for async work execution
We hash regular files to avoid having multiple threads hammer on the inode mutex, but it should not be needed on other types of files (like sockets). Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
4a0a7a1874
commit
53108d476a
1 changed files with 3 additions and 1 deletions
|
@ -581,7 +581,9 @@ static inline bool io_prep_async_work(struct io_kiocb *req,
|
|||
switch (req->sqe->opcode) {
|
||||
case IORING_OP_WRITEV:
|
||||
case IORING_OP_WRITE_FIXED:
|
||||
do_hashed = true;
|
||||
/* only regular files should be hashed for writes */
|
||||
if (req->flags & REQ_F_ISREG)
|
||||
do_hashed = true;
|
||||
/* fall-through */
|
||||
case IORING_OP_READV:
|
||||
case IORING_OP_READ_FIXED:
|
||||
|
|
Loading…
Add table
Reference in a new issue