On Wed, Oct 18, 2023 at 08:18:41AM -0700, Keith Busch wrote: > From: Keith Busch <kbusch@xxxxxxxxxx> > > 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. In practice, metadata payload sizes are a > small fraction of the main payload, so this shouldn't be a problem. We can't just remove the old path. We might still need bounce buffering to due misalignment and/or because it is notcontiguous. Same as we have a direct map and a copy path for data.