]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: punt even fadvise() WILLNEED to async context
authorJens Axboe <axboe@kernel.dk>
Sat, 1 Feb 2020 16:22:49 +0000 (09:22 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Feb 2020 00:27:47 +0000 (17:27 -0700)
commitf17dd3ee1e2f0f91c0e5d1d5b0261e0fefbe9b0e
tree74c3ba56ba6dcd4ed8bb684b837820d4b325d215
parent7df54e749e8f5c02684cf0ab3ea0595a66179c8a
io_uring: punt even fadvise() WILLNEED to async context

Andres correctly points out that read-ahead can block, if it needs to
read in meta data (or even just through the page cache page allocations).
Play it safe for now and just ensure WILLNEED is also punted to async
context.

While in there, allow the file settings hints from non-blocking
context. They don't need to start/do IO, and we can safely do them
inline.

Fixes: 5947190b5f7b ("io_uring: add IORING_OP_FADVISE")
Reported-by: Andres Freund <andres@anarazel.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c