block: add support for passing back a bio for non-polled dio
authorJens Axboe <axboe@kernel.dk>
Thu, 19 Aug 2021 01:35:25 +0000 (19:35 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Aug 2021 03:22:10 +0000 (21:22 -0600)
commitfacf46c9a78c920229e4ad242910cd9c4688ced8
tree9d9bd12a3d9c10b7423d98eebaace1acdef25b1e
parentb5599bb5cd57ea6b2f240bc01df14359689ae538
block: add support for passing back a bio for non-polled dio

We support cached bio allocations and frees from polled IO, since it's
trivial to do when we know IRQs are not going to be involved. However,
some issuers of non-polled dio always complete from task context. That
means we can support bio caching for that as well.

Add a IOCB_PUT_CACHE flag that allows to pass back a bio through the
kiocb, passing ownership of that bio to the kiocb completion handling.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/block_dev.c
include/linux/fs.h