Skip to content
Commit 492c5d45 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe
Browse files

block: bio-integrity: directly map user buffers



Passthrough commands that utilize metadata currently need to bounce the
user space buffer through the kernel. Add support for mapping user space
directly so that we can avoid this costly overhead. This is similar to
how the normal bio data payload utilizes user addresses with
bio_map_user_iov().

If the user address can't directly be used for reason, like too many
segments or address unalignement, fallback to a copy of the user vec
while keeping the user address pinned for the IO duration so that it
can safely be copied on completion in any process context.

Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20231130215309.2923568-2-kbusch@meta.com


[axboe: fold in fix from Kanchan Joshi]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 668bfeea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment