Re: [PATCH v6 12/12] nvme-rdma: factor out the scatterlist DMA mapping helper

Logan Gunthorpe <[email protected]> Mon, 27 Jul 2026 09:49:27 -0600
Newsgroups org.kernel.vger.linux-raid,org.infradead.lists.linux-nvme,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-rdma,org.kernel.vger.stable
Message-ID <[email protected]>

On 2026-07-26 05:32, Mykola Marzhan wrote:
> The data and the metadata mapping do the same thing: describe the
> segments blk_rq_map_sg() produced in a local sg_table -- the embedded
> one's orig_nents is the allocated size, not the valid-segment count --
> map that, and hand back the DMA-mapped count.  Fold both into a
> helper.
> 
> No functional change.
> 
> Suggested-by: Logan Gunthorpe <[email protected]>
> Assisted-by: Claude:claude-fable-5
> Signed-off-by: Mykola Marzhan <[email protected]>

In the future, it's usually better to do the refactoring commits before
the commits that change things (as that makes the important commits
easier to understand). But that is a very minor nit. Thanks!

Reviewed-by: Logan Gunthorpe <[email protected]>