[PATCH 2/2] blk-mq-dma: bring back p2p request flags
Christoph Hellwig
hch at lst.de
Mon Sep 1 22:33:58 PDT 2025
On Fri, Aug 29, 2025 at 07:23:07AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
>
> We only need to consider data and metadata dma mapping types separately.
> The request and bio integrity payload have enough flag bits to
> internally track the mapping type for each. Add flags for these so the
> caller doesn't need to track them, and provide separete request and
> integrity helpers to the common code for unmpaping. This will make it
> easier to scale as new mappings are added without burdening the caller
> to track such things.
We are actually about to run out of REQ_* bits with the current
encoding. We could shrink the space for REQ_OP_ a bit to create
more, or try to move some flags out into BIO_ flags (like
REQ_ALLOC_CACHE) or kill them by looking at pointers instead
(REQ_INTEGRITY), or by overlaying flags that can't be used with
the same of (REQ_FUA vs REQ_RAHEAD vs REQ_UNMAP for example).
And maybe we can come up with a more coherent scheme for
REQ_PRIO / REQ_BACKGROUND / REQ_SWAP and maybe REQ_IDLE that create
another priority scheme in addition to the I/O priorities.
More information about the Linux-nvme
mailing list