[PATCH] nvme-pci: add missing condition check for existence of mapped data
Christoph Hellwig
hch at lst.de
Tue Jul 30 10:21:11 PDT 2024
On Tue, Jul 30, 2024 at 11:09:04AM -0600, Keith Busch wrote:
> > + if (blk_rq_nr_phys_segments(req))
> > + nvme_unmap_data(dev, req);
>
> This is already applied, but it is kind of strange. We get here only if
> metadata mapping fails. Is there actually a command that has metadata
> without data?
Well, passthrough can always set metadata to map without data even
if there is no NVMe defined command that works that way, so we should
handle the error.
But I suspect this is due to Leon's dma-mapping work, and it probably
points to a bug in that :)
More information about the Linux-nvme
mailing list