[PATCH 2/4] blk-mq-dma: unify DMA unmap routine
Keith Busch
kbusch at kernel.org
Mon Oct 13 11:53:47 PDT 2025
On Mon, Oct 13, 2025 at 06:34:10PM +0300, Leon Romanovsky wrote:
> +bool blk_rq_dma_unmap(struct request *req, struct device *dma_dev,
> + struct dma_iova_state *state, size_t mapped_len)
> +{
> + struct bio_integrity_payload *bip = bio_integrity(req->bio);
> +
> + if ((!bip && req->cmd_flags & REQ_P2PDMA) ||
> + bio_integrity_flagged(req->bio, BIP_P2P_DMA))
> + return true;
I don't think you can unify it at this part here because the data
payload might not be P2P but the integrity payload could be. The data
payload needs to proceed to the next unmapping step in that case, but
this change would have it return true early.
More information about the Linux-nvme
mailing list