block: pass down no-wait info in the blk_plug
authorJens Axboe <axboe@kernel.dk>
Mon, 1 Jun 2020 14:23:31 +0000 (08:23 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Jun 2020 16:02:27 +0000 (10:02 -0600)
commitb90cbe8eccf35cf502c35891beb74d99474136ef
tree0235803a23df520cc58d6023574bdbe7134fd969
parent35da8043f28190388157e212f8bb63a41191f1a1
block: pass down no-wait info in the blk_plug

Turns out that making REQ_RAHEAD imply REQ_NOWAIT causes performance
regressions on rotational storage with few request slots. Revert the
change doing that, and instead pass down this information in the
blk_plug instead. If plug->nowait is set, then we'll set REQ_NOWAIT
on the bio when submitted.

This provides blocking read-ahead as before, while retaining the
ability to issue async buffered reads without blocking on request
shortages.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
fs/io_uring.c
include/linux/blk_types.h
include/linux/blkdev.h