Skip to content
Snippets Groups Projects
Commit f7c91343 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/rw: allow pollable non-blocking attempts for !FMODE_NOWAIT


The checking for whether or not io_uring can do a non-blocking read or
write attempt is gated on FMODE_NOWAIT. However, if the file is
pollable, it's feasible to just check if it's currently in a state in
which it can sanely receive or send _some_ data.

This avoids unnecessary io-wq punts, and repeated worthless retries
before doing that punt, by assuming that some data can get delivered
or received if poll tells us that is true. It also allows multishot
reads to properly work with these types of files, enabling a bit of
a cleanup of the logic that:

c9d952b9 ("io_uring/rw: fix cflags posting for single issue multishot read")

had to put in place.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c9d952b9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment