]> 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)
commita13878f99f75fa53e2cb65b1739f92bc75cee3e5
tree74c3ba56ba6dcd4ed8bb684b837820d4b325d215
parentb22d9c509d5bb189c73b213c2f2ff1e32f0973f0
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: 0b9b9d67700c ("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