[PATCH 2/4] nvme: use bio_integrity_map_user

Kanchan Joshi joshi.k at samsung.com
Wed Oct 25 06:26:58 PDT 2023


On 10/18/2023 8:48 PM, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
> 
> Map user metadata buffers directly instead of maintaining a complicated
> copy buffer.
> 
> Now that the bio tracks the metadata through its bip, nvme doesn't need
> special metadata handling, callbacks, or additional fields in the pdu.
> This greatly simplifies passthrough handling and avoids a "might_fault"
> copy_to_user in the completion path. This also creates pdu space to
> track the original request separately from its bio, further simplifying
> polling without relying on special iouring fields.
> 
> The downside is that nvme requires the metadata buffer be physically
> contiguous, so user space will need to utilize huge pages if the buffer
> needs to span multiple pages.

I did not notice where this downside part is getting checked in the code.



More information about the Linux-nvme mailing list