diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-07-08 18:55:27 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-08-02 02:32:43 +0300 |
commit | 9cf3516c29e6dba95d36d7d86c03b06495107859 (patch) | |
tree | 80d8f5a6898ecf8d0b532ab8eaabd3e322e796bc /io_uring/rw.c | |
parent | 7b3c14d1a96bf63c078c3bbfe5573fb964e80b95 (diff) | |
download | linux-9cf3516c29e6dba95d36d7d86c03b06495107859.tar.xz |
fs: add IOCB flags related to passing back dio completions
Async dio completions generally happen from hard/soft IRQ context, which
means that users like iomap may need to defer some of the completion
handling to a workqueue. This is less efficient than having the original
issuer handle it, like we do for sync IO, and it adds latency to the
completions.
Add IOCB_DIO_CALLER_COMP, which the issuer can set if it is able to
safely punt these completions to a safe context. If the dio handler is
aware of this flag, assign a callback handler in kiocb->dio_complete and
associated data io kiocb->private. The issuer will then call this
handler with that data from task context.
No functional changes in this patch.
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rw.c')
0 files changed, 0 insertions, 0 deletions