linux/io_uring
Jens Axboe f7c9134385 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:

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

had to put in place.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-10-06 20:58:53 -06:00
..
2024-09-11 10:44:10 -06:00
2024-09-16 13:29:00 +02:00
2024-06-19 07:57:21 -06:00
2022-07-24 18:39:11 -06:00
2024-09-24 11:11:38 -07:00
2024-09-24 11:11:38 -07:00
2024-02-09 09:04:39 -07:00
2024-02-09 09:04:39 -07:00
2024-09-11 10:44:10 -06:00